masteryhx commented on code in PR #20313:
URL: https://github.com/apache/flink/pull/20313#discussion_r934176373
##########
flink-runtime/src/test/java/org/apache/flink/runtime/state/SharedStateRegistryTest.java:
##########
@@ -182,20 +194,113 @@ public void testRegisterChangelogStateBackendHandles()
throws InterruptedExcepti
}
@Test
- public void testUnregisterUnusedState() {
+ public void testUnregisterUnusedSavepointState() {
SharedStateRegistry sharedStateRegistry = new
SharedStateRegistryImpl();
TestingStreamStateHandle handle = new TestingStreamStateHandle();
- sharedStateRegistry.registerReference(new
SharedStateRegistryKey("first"), handle, 1L);
- sharedStateRegistry.registerReference(new
SharedStateRegistryKey("first"), handle, 2L);
- sharedStateRegistry.registerReference(new
SharedStateRegistryKey("first"), handle, 3L);
+
+ registerInitialCheckpoint(
+ sharedStateRegistry,
+ RESTORED_STATE_ID,
+ CheckpointProperties.forSavepoint(false,
SavepointFormatType.NATIVE));
+
+ sharedStateRegistry.registerReference(
Review Comment:
I see. I just think about this case.
The checkpoint 2 and 3 should be placeholder in the real world if no failure
occurs so that the restored state will not be discarded in NO_CLAIM mode, right
?
In your case, it just be overided by new reference so that it will work.
--
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]