Myasuka commented on a change in pull request #18382:
URL: https://github.com/apache/flink/pull/18382#discussion_r790293553
##########
File path:
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogKeyedStateBackend.java
##########
@@ -441,7 +469,17 @@ public void notifyCheckpointComplete(long checkpointId)
throws Exception {
// This might change if the log ownership changes (the method
won't likely be needed).
stateChangelogWriter.confirm(lastUploadedFrom, lastUploadedTo);
}
- keyedStateBackend.notifyCheckpointComplete(checkpointId);
+ Long materializationID =
materializationIdByCheckpointId.remove(checkpointId);
+ if (materializationID != null) {
+ keyedStateBackend.notifyCheckpointComplete(materializationID);
+ pendingMaterializationConfirmations.remove(materializationID);
Review comment:
I think we can introduce another `lastConfirmedMaterizationId` (simliar
like `lastCheckpointId`), we only notifyCheckpoint complete to wrapped state
backend if current materilzation id is larger than
`lastConfirmedMaterizationId`. If so, we can also avoid to update
`pendingMaterializationConfirmations` each time as we don't need to record
checkpoints if this materilzation id is equal to `lastConfirmedMaterizationId`.
--
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]