alievmirza commented on code in PR #6023:
URL: https://github.com/apache/ignite-3/pull/6023#discussion_r2219239287


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/disaster/ManualGroupRestartRequest.java:
##########
@@ -99,6 +124,20 @@ public CompletableFuture<Void> 
handle(DisasterRecoveryManager disasterRecoveryMa
 
         var restartFutures = new ArrayList<CompletableFuture<?>>();
 
+        if (cleanUp) {
+            restartPartitionWithCleanup(disasterRecoveryManager, revision, 
timestamp, restartFutures);
+        } else {
+            restartPartition(disasterRecoveryManager, revision, 
restartFutures);
+        }
+
+        return restartFutures.isEmpty() ? nullCompletedFuture() : 
allOf(restartFutures.toArray(CompletableFuture[]::new));

Review Comment:
   As far as can I understand, this future is needed further to complete 
`ongoingOperationsById` 
   
   java doc says (btw, written by you :) ):
   
   ```
       /**
        * Map of operations, triggered by local node, that have not yet been 
processed by {@link #watchListener}. Values in the map are the
        * futures, returned from the {@link 
#processNewRequest(DisasterRecoveryRequest)}, they are completed by
        * {@link #handleTriggerKeyUpdate(WatchEvent)} when node receives 
corresponding events from the metastorage (or if it doesn't receive
        * this event within a 30 seconds window).
        */
       private final Map<UUID, CompletableFuture<Void>> ongoingOperationsById = 
new ConcurrentHashMap<>();
   ```
   
   from my point of view, ticket is not needed here, everything should be safe. 



-- 
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