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



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/state/SharedStateRegistryTest.java
##########
@@ -98,6 +106,77 @@ public void testUnregisterWithUnexistedKey() {
         sharedStateRegistry.unregisterUnusedState(Long.MAX_VALUE);
     }
 
+    @Test
+    public void testRegisterChangelogStateBackendHandles() throws 
InterruptedException {
+        SharedStateRegistry sharedStateRegistry = new 
SharedStateRegistryImpl();
+        long materializationId1 = 1L;
+        IncrementalStateHandleWrapper incrementalTMStateHandle1 =
+                createDummyIncrementalStateHandle(materializationId1);
+
+        IncrementalStateHandleWrapper incrementalJMStateHandle11 = 
incrementalTMStateHandle1.copy();
+        ChangelogStateHandleWrapper changelogStateHandle1 = 
createDummyChangelogStateHandle(1, 2);
+        long checkpointId1 = 41;
+        ChangelogStateBackendHandle.ChangelogStateBackendHandleImpl 
changelogStateBackendHandle1 =
+                new 
ChangelogStateBackendHandle.ChangelogStateBackendHandleImpl(
+                        Collections.singletonList(incrementalJMStateHandle11),
+                        Collections.singletonList(changelogStateHandle1),
+                        incrementalTMStateHandle1.getKeyGroupRange());
+        changelogStateBackendHandle1.registerSharedStates(sharedStateRegistry, 
checkpointId1);
+        sharedStateRegistry.checkpointCompleted(checkpointId1);
+        sharedStateRegistry.unregisterUnusedState(checkpointId1);
+
+        IncrementalStateHandleWrapper incrementalJMStateHandle12 = 
incrementalTMStateHandle1.copy();

Review comment:
       Sure, I will then add comment.




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


Reply via email to