rkhachatryan commented on a change in pull request #17203:
URL: https://github.com/apache/flink/pull/17203#discussion_r710829954



##########
File path: 
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/restore/ChangelogBackendRestoreOperation.java
##########
@@ -89,14 +82,11 @@
             ChangelogKeyedStateBackend<?> backend,
             ChangelogStateBackendHandle backendHandle,
             StateChangelogHandleReader<T> changelogHandleReader,
-            ClassLoader classLoader,
-            Map<UUID, Map<Short, StateID>> metadataByBackend)
+            ClassLoader classLoader)
             throws Exception {
+        Map<Short, StateID> stateIds = new HashMap<>();

Review comment:
       As discussed offline:
   The loop iterates over the log segments of a single backend 
(`backendHandle.getNonMaterializedStateHandles()`)
   So it would be incorrect to re-create the map inside the loop, because 
earlier log segments might contain metadata needed for the later ones.
   And there should be no data from other backends during the whole loop, 
because `backendHandle` comes from a single backend.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to