fredia commented on code in PR #19907:
URL: https://github.com/apache/flink/pull/19907#discussion_r926305448
##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/TaskLocalStateStoreImpl.java:
##########
@@ -464,7 +452,7 @@ private void pruneCheckpoints(LongPredicate pruningChecker,
boolean breakOnceChe
long entryCheckpointId = snapshotEntry.getKey();
if (pruningChecker.test(entryCheckpointId)) {
- toRemove.add(snapshotEntry);
+ toRemove.add(new SimpleEntry<>(snapshotEntry));
Review Comment:
It was a bug here, `snapshotEntry` would be updated during iterating, which
would cause items already added to `toRemove` to be changed.
Nice suggestion, I have replaced `Map.Entry` with `Tuple2`.
--
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]