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


##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageManagerImpl.java:
##########
@@ -311,75 +316,37 @@ public void addElectionListener(ElectionListener 
listener) {
         electionListeners.add(listener);
     }
 
-    private CompletableFuture<Long> recover(MetaStorageService service) {
-        if (!busyLock.enterBusy()) {
-            return failedFuture(new NodeStoppingException());
-        }
+    private CompletableFuture<?> 
updateTargetRevisionsForRecovery(MetaStorageService service) {
+        return inBusyLockAsync(busyLock, () -> {
+            service.currentRevisions()
+                    .thenAccept(targetRevisions -> {
+                        assert targetRevisions != null;
 
-        try {
-            service.currentRevision().whenComplete((targetRevision, throwable) 
-> {
-                if (throwable != null) {
-                    recoveryFinishedFuture.completeExceptionally(throwable);
+                        LOG.info("Performing MetaStorage recovery: [from={}, 
to={}]", storage.revisions(), targetRevisions);

Review Comment:
   I think this can be useful to us first of all when there are some problems 
at the start of the node.



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