sashapolo commented on code in PR #3042:
URL: https://github.com/apache/ignite-3/pull/3042#discussion_r1450573131
##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageManagerImpl.java:
##########
@@ -121,12 +105,17 @@ public class MetaStorageManagerImpl implements
MetaStorageManager {
/** Prevents double stopping of the component. */
private final AtomicBoolean isStopped = new AtomicBoolean();
+ private final AtomicLong appliedRevision = new AtomicLong(0L);
+
/**
* Future which completes when MetaStorage manager finished local
recovery. The value of the future is the revision which must be used
* for state recovery by other components.
*/
private final CompletableFuture<Long> recoveryFinishedFuture = new
CompletableFuture<>();
+ private final CompletableFuture<Long> recoveryFinishedPublicFuture
+ = recoveryFinishedFuture.whenComplete((revision, e) ->
appliedRevision.set(revision));
Review Comment:
Can `recoveryFinishedFuture` be completed with a exception? If yes, then the
current approach is incorrect (you should verify that `e != null`)
--
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]