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


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -496,19 +495,15 @@ public void start() {
 
             lowWatermark.start();
 
-            startTables();
+            CompletableFuture<Long> recoveryFinishFuture = 
metaStorageMgr.recoveryFinishedFuture();
 
-            try {
-                metaStorageMgr.recoveryFinishedFuture()
-                        .thenComposeAsync(this::performRebalanceOnRecovery, 
ioExecutor)
-                        .get();
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-
-                throw new IgniteInternalException(INTERNAL_ERR, e);
-            } catch (ExecutionException e) {
-                throw new IgniteInternalException(INTERNAL_ERR, e);
-            }
+            assert recoveryFinishFuture.isDone();
+
+            long recoveryRevision = recoveryFinishFuture.join();
+
+            startTables(recoveryRevision);
+
+            performRebalanceOnRecovery(recoveryRevision);

Review Comment:
   Can one of these methods return futures and add to 
`startVv.update(recoveryRevision, (v, e) -> allOf(startTablesFuture, 
performRebalanceOnRecoveryFuture));` once?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to