masteryhx commented on code in PR #20313:
URL: https://github.com/apache/flink/pull/20313#discussion_r933083299
##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/SharedStateRegistryImpl.java:
##########
@@ -365,4 +401,19 @@ public String toString() {
return "EmptyDiscardStateObject{" + stateHandleID + '}';
}
}
+
+ private boolean preventsDiscardingCreatedCheckpoint(SharedStateEntry
entry) {
+ // explicitly set by the backend, e.g. private state is reused
+ if (entry.preventDiscardingCreatedCheckpoint
+ &&
restoredCheckpointSharingStrategies.containsKey(entry.createdByCheckpointID)) {
+ return true;
+ }
+ // with NO_SHARING strategy, shared state, if any, is bundled inside
the checkpoint folder
+ // noinspection RedundantIfStatement
+ if (NO_SHARING ==
restoredCheckpointSharingStrategies.get(entry.createdByCheckpointID)) {
Review Comment:
IIUC, NO_SHARING means the cp will not be used by next cp, so it's no need
to delete it lazily if `NO_SHARING` works as its comments, right ?
Actually, I think there are an issue about NO_SHARING currently. While
restoring from `NO_SHARING`, the `materializedSstFiles` should be empty, but
currently not as you could see in `RocksDBKeyedStateBackendBuilder#build`.
IIUC, After fixing this, it should be FORMARD not NO_SHARING, right ?
Or I missed something ?
WDYT?
--
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]