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



##########
File path: 
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogKeyedStateBackend.java
##########
@@ -358,7 +461,23 @@ public void notifyCheckpointAborted(long checkpointId) 
throws Exception {
                         keyedStateBackend.getKeyContext(),
                         stateChangelogWriter,
                         meta);
-        return stateFactory.create(state, kvStateChangeLogger);
+        return stateFactory.create(
+                state,
+                kvStateChangeLogger,
+                keyedStateBackend /* pass the nested backend as key context so 
that it get key updates on recovery*/);
+    }
+
+    private void completeRestore(Collection<ChangelogStateBackendHandle> 
stateHandles) {
+        if (!stateHandles.isEmpty()) {
+            synchronized (materialized) { // ensure visibility

Review comment:
       I agree, will add `syncrhonized (materialized)`.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to