vldpyatkov commented on a change in pull request #608:
URL: https://github.com/apache/ignite-3/pull/608#discussion_r800677428



##########
File path: 
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
##########
@@ -327,11 +331,55 @@ public void start(@Nullable String cfg) {
                 doStartComponent(name, startedComponents, component);
             }
 
+            CompletableFuture<Void> upToDateMetastorageRevisionFut = new 
CompletableFuture<>();
+
+            metaStorageMgr.listen(MetastorageEvent.REVISION_APPLIED, new 
EventListener<MetastorageEventParameters>() {
+                @Override
+                public boolean notify(@NotNull MetastorageEventParameters 
parameters, @Nullable Throwable exception) {
+                    if (exception != null) {
+                        
upToDateMetastorageRevisionFut.completeExceptionally(exception);
+
+                        return true;
+                    }
+
+                    long metastorageRevision = 
metaStorageMgr.revision().join();
+
+                    assert metastorageRevision >= parameters.getRevision() : 
IgniteStringFormatter.format(
+                            "Metastorage revision must greater than the node 
applied revision [msRev={}, appliedRev={}",

Review comment:
       Ok, done.




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