Github user sihuazhou commented on a diff in the pull request:
https://github.com/apache/flink/pull/5578#discussion_r171130718
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/state/TaskLocalStateStoreImpl.java
---
@@ -90,6 +92,9 @@
@GuardedBy("lock")
private boolean disposed;
+ /** Whether to discard the useless state when retrieve local checkpoint
state. */
+ private boolean retrieveWithDiscard = true;
--- End diff --
Aha, this is just for passing the existing test case in
`TaskLocalStateStoreImplTest` ...
```java
private void checkStoredAsExpected(List<TaskStateSnapshot> history, int
off, int len) throws Exception {
for (int i = off; i < len; ++i) {
TaskStateSnapshot expected = history.get(i);
Assert.assertTrue(expected ==
taskLocalStateStore.retrieveLocalState(i));
Mockito.verify(expected,
Mockito.never()).discardState();
}
}
```
---