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



##########
File path: 
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogKeyedStateBackend.java
##########
@@ -600,8 +601,15 @@ private ChangelogSnapshotState completeRestore(
                                     System.currentTimeMillis(),
                                     streamFactory,
                                     CHECKPOINT_OPTIONS),
-                            // TODO: add metadata to log FLINK-23170.
-                            upTo));
+                            upTo);
+
+            // log metadata after materialization is triggered
+            for (InternalKvState<K, ?, ?> changelogState : 
keyValueStatesByName.values()) {
+                checkState(changelogState instanceof ChangelogState);
+                ((ChangelogState) changelogState).resetWritingMetaFlag();

Review comment:
       The loop is still through `keyValueStatesByName` only which only 
contains KV states.
   What I meant is to loop through `priorityQueueStatesByName` as well which 
contains PQ states.
   
   nit: checkState is unnecessary because JRE will check this on the next line.




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