1996fanrui commented on code in PR #24770:
URL: https://github.com/apache/flink/pull/24770#discussion_r1597329545


##########
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/metadata/CheckpointTestUtils.java:
##########
@@ -343,7 +343,11 @@ private static StreamStateHandle 
createDummySegmentFileStateHandle(Random rnd) {
     private static StreamStateHandle createDummySegmentFileStateHandle(
             Random rnd, boolean isEmpty) {
         return isEmpty
-                ? TestingSegmentFileStateHandle.EMPTY_INSTANCE
+                ? new TestingSegmentFileStateHandle(
+                        new Path(UUID.randomUUID().toString()),

Review Comment:
   2 tests[1] failed, I changed the path from `empty` to random string to fix 
them.
   
   ## Reason:
   
   SharedStateRegistryImpl#registerReference uses `registrationKey` to check 
whether StreamStateHandle is same. The `registrationKey` is generated from path 
name.
   
   So all `empty` string generates the same `registrationKey`, but 
StreamStateHandle are not same.
   
   ## My question:
   
   Is there strong reason to use `empty` as the path name? If no, current 
change is fine.
   
   [1] 
https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=59448&view=logs&j=0da23115-68bb-5dcd-192c-bd4c8adebde1&t=24c3384f-1bcb-57b3-224f-51bf973bbee8&l=9594



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