sanpwc commented on code in PR #2488:
URL: https://github.com/apache/ignite-3/pull/2488#discussion_r1322774906


##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/AssignmentsTracker.java:
##########
@@ -82,22 +76,33 @@ public AssignmentsTracker(VaultManager vaultManager, 
MetaStorageManager msManage
     public void startTrack() {
         
msManager.registerPrefixWatch(ByteArray.fromString(STABLE_ASSIGNMENTS_PREFIX), 
assignmentsListener);
 
-        try (Cursor<VaultEntry> cursor = vaultManager.range(
-                ByteArray.fromString(STABLE_ASSIGNMENTS_PREFIX),
-                
ByteArray.fromString(incrementLastChar(STABLE_ASSIGNMENTS_PREFIX))
-        )) {
-            for (VaultEntry entry : cursor) {
-                String key = entry.key().toString();
+        msManager.recoveryFinishedFuture().thenAccept(recoveryRevision -> {
+            try (Cursor<Entry> cursor = 
msManager.getLocally(ByteArray.fromString(STABLE_ASSIGNMENTS_PREFIX),

Review Comment:
   I wait it here in order to retrieve the recoveryRevision. This future is 
guaranteed to be completed here. It's a common practice, e.g. check 
TableManager#start



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