Myasuka commented on a change in pull request #8693:
URL: https://github.com/apache/flink/pull/8693#discussion_r424851251



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/state/TaskLocalStateStoreImplTest.java
##########
@@ -153,6 +153,21 @@ public void confirmCheckpoint() throws Exception {
                checkStoredAsExpected(taskStateSnapshots, confirmed, chkCount);
        }
 
+       /**
+        * Tests pruning of target previous checkpoints if that checkpoint is 
aborted.
+        */
+       @Test
+       public void abortCheckpoint() throws Exception {
+
+               final int chkCount = 4;
+               final int aborted = chkCount - 2;
+               List<TaskStateSnapshot> taskStateSnapshots = 
storeStates(chkCount);
+               taskLocalStateStore.abortCheckpoint(aborted);
+               checkPrunedAndDiscarded(taskStateSnapshots, aborted, aborted + 
1);
+               checkStoredAsExpected(taskStateSnapshots, 0, aborted);
+               checkStoredAsExpected(taskStateSnapshots, aborted + 1, 
chkCount);

Review comment:
       `taskLocalStateStore.retrieveLocalState(checkpointId)` would actually 
already check snapshot was removed from 
`TaskLocalStateStoreImpl.storedTaskStateByCheckpointID`.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to