zoltar9264 commented on code in PR #22669:
URL: https://github.com/apache/flink/pull/22669#discussion_r1211171195


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/IncrementalRemoteKeyedStateHandle.java:
##########
@@ -361,9 +362,10 @@ IncrementalRemoteKeyedStateHandle copy() {
 
     /** Create a unique key to register one of our shared state handles. */
     @VisibleForTesting
-    public SharedStateRegistryKey 
createSharedStateRegistryKeyFromFileName(StateHandleID shId) {
+    public SharedStateRegistryKey 
createSharedStateRegistryKey(StreamStateHandle handle) {
+        String keyString = handle.getStreamStateHandleID().getKeyString();
         return new SharedStateRegistryKey(
-                String.valueOf(backendIdentifier) + '-' + keyGroupRange, shId);
+                
UUID.nameUUIDFromBytes(keyString.getBytes(StandardCharsets.UTF_8)).toString());

Review Comment:
   Do you mean like in ChangelogStateHandleStreamImpl ? 
   Since the basic unit of deletion is the StreamStateHandle, I instead think 
it's correct to use a key based on StreamStateHandle#getStreamStateHandleID() . 
If SharedStateRegisterKey is based on <StreamStateHandle,offset> pairs, files 
may be deleted while they are still in use.
   And the changes here do not affect ChangelogStateHandleStreamImpl, whose 
registration logic is independent.



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