sanpwc commented on a change in pull request #642:
URL: https://github.com/apache/ignite-3/pull/642#discussion_r832123280
##########
File path:
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
##########
@@ -568,4 +628,44 @@ private static Path getPartitionsStorePath(Path workDir) {
STOPPING
}
+
+ /**
+ * Configuration listener class that is intended to complete catch-up
future during recovery when configuration
+ * is up-to-date.
+ */
+ private class ConfigurationCatchUpListener implements
ConfigurationStorageRevisionListener {
+ /** Revision to catch up. */
+ private long cfgRevision;
+
+ /** Catch-up future. */
+ private final CompletableFuture<Void> catchUpFuture;
+
+ /**
+ * Constructor.
+ *
+ * @param cfgRevision Revision to catch up.
+ * @param catchUpFuture Catch-up future.
+ */
+ public ConfigurationCatchUpListener(long cfgRevision,
CompletableFuture<Void> catchUpFuture) {
+ this.cfgRevision = cfgRevision;
+ this.catchUpFuture = catchUpFuture;
+ }
+
+ /** {@inheritDoc} */
+ @Override public CompletableFuture<?> onUpdate(long cfgUpdateRevision)
{
+ assert cfgRevision >= cfgUpdateRevision :
IgniteStringFormatter.format(
Review comment:
Seems that currently there's a race between assertion (listener
registration) and initial retrieval of last revision. Please check my comment
above.
--
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]