You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/09/14 08:25:24 UTC

[GitHub] [flink] rkhachatryan commented on a change in pull request #17203: [FLINK-22944][state] Optimize writing state changelog

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



##########
File path: flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogKeyedStateBackend.java
##########
@@ -506,7 +517,9 @@ public void notifyCheckpointAborted(long checkpointId) throws Exception {
                         stateChangelogWriter,
                         meta,
                         stateDesc.getTtlConfig(),
-                        stateDesc.getDefaultValue());
+                        stateDesc.getDefaultValue(),
+                        ++lastCreatedStateId);

Review comment:
       There is no connection between "old" state id (before recovery) and the "new" one (after recovery).
   Recovery doesn't depend on the new state id as the mapping (from id to name) is written in snapshot (though recovery might increment `lastCreatedStateId`).
   New snapshot after recovery will not depend on the old id because the mapping will be written at least once after recovery.




-- 
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-unsubscribe@flink.apache.org

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