tkalkirill commented on code in PR #6199:
URL: https://github.com/apache/ignite-3/pull/6199#discussion_r2192020093


##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/WatchProcessor.java:
##########
@@ -224,36 +227,34 @@ public CompletableFuture<Void> notifyWatches(long 
newRevision, List<Entry> updat
      * @return Updated value of {@link #notificationFuture}.
      */
     @VisibleForTesting
-    CompletableFuture<Void> enqueue(Supplier<CompletableFuture<Void>> 
asyncAction, Supplier<String> additionalInfoSupplier) {
-        while (true) {
-            CompletableFuture<Void> chainingFuture = new CompletableFuture<>();
-
-            CompletableFuture<Void> newNotificationFuture = chainingFuture
+    CompletableFuture<Void> enqueue(
+            Supplier<CompletableFuture<Void>> asyncAction,
+            Consumer<CompletableFuture<Void>> afterEnqueuing,
+            Supplier<String> additionalInfoSupplier
+    ) {
+        synchronized (notificationFutureMutex) {

Review Comment:
   Well, it would be great to make it non-blocking.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to