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


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -589,10 +588,29 @@ private CompletableFuture<Void> 
performRebalanceOnRecovery(long revision) {
 
         try (Cursor<Entry> cursor = metaStorageMgr.prefixLocally(prefix, 
revision)) {
             CompletableFuture<?>[] futures = cursor.stream()
-                    .map(this::handleChangePendingAssignmentEvent)
+                    .map(pendingAssignmentEntry -> {
+                        if (LOG.isInfoEnabled()) {
+                            LOG.info(
+                                    "Missed pending assignments for key '{}' 
with revision {} discovered, performing recovery",
+                                    new String(pendingAssignmentEntry.key(), 
UTF_8),
+                                    revision
+                            );
+                        }
+
+                        // We use the Meta Storage recovery revision here 
instead of the entry revision, because
+                        // 'handleChangePendingAssignmentEvent' accesses some 
Versioned Values that only store values starting with
+                        // tokens equal to Meta Storage recovery revision. In 
other words, if the entry has a lower revision than the
+                        // recovery revision, there will never be a Versioned 
Value corresponding to its revision.
+                        return 
handleChangePendingAssignmentEvent(pendingAssignmentEntry, revision);

Review Comment:
   I don't understand your comment a bit.
   In your case, there is no need for an asynchronous start of recovery; you 
can read the keys from the metastore and then start processing them 
asynchronously, right?



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