sanpwc commented on a change in pull request #642:
URL: https://github.com/apache/ignite-3/pull/642#discussion_r832122313
##########
File path:
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
##########
@@ -368,6 +385,49 @@ public void start(@Nullable String cfg) {
}
}
+ /**
+ * Awaits for a permission to join the cluster, i.e. node join response
from Cluster Management group.
+ * After the completion of this method, the node is considered as
validated.
+ */
+ private void waitForJoinPermission() {
+ // TODO https://issues.apache.org/jira/browse/IGNITE-15114
+ }
+
+ /**
+ * Creates a listener for configuration updates and a future which will be
completed when configuration is up-to-date enough
+ * to complete the local recovery.
+ *
+ * @return Future, which completes when the local configuration is close
enough to distributed one.
+ */
+ private CompletableFuture<Void> configurationCatchUpFuture() {
+ //TODO: IGNITE-15114 This is a temporary solution until full process
of the node join is implemented.
+ if (!metaStorageMgr.isMetaStorageInitializedOnStart()) {
+ return CompletableFuture.completedFuture(null);
+ }
+
+ CompletableFuture<Void> catchUpFuture = new CompletableFuture<>();
+
+ ConfigurationStorageRevisionListener listener =
+ new
ConfigurationCatchUpListener(cfgStorage.lastRevision().join(), catchUpFuture);
Review comment:
I don't think that we need to parametrize ConfigurationCatchUpListener
with initial lastRevision. I'd rather use something like
```
cfgStorage.lastRevision().thenAccept(
rev -> {
if (isConfigurationUpToDate(rev, cfgUpdateRevision))
{
catchUpFuture.complete(null);
}
});
```
inside ConfigurationCatchUpListener#onUpdate. WDYT?
In general please favor future pipelining to join()
--
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]