zoltar9264 commented on code in PR #23146: URL: https://github.com/apache/flink/pull/23146#discussion_r1285492407
########## flink-runtime/src/main/java/org/apache/flink/runtime/state/SharedStateRegistry.java: ########## @@ -106,4 +108,12 @@ StreamStateHandle registerReference( void registerAllAfterRestored(CompletedCheckpoint checkpoint, RestoreMode mode); void checkpointCompleted(long checkpointId); + + /** Create a unique key based on physical id. */ + static SharedStateRegistryKey createSharedStateRegistryKey(StreamStateHandle handle) { + String keyString = handle.getStreamStateHandleID().getKeyString(); + // key strings tend to be longer, so we use the MD5 of the key string to save memory + return new SharedStateRegistryKey( + UUID.nameUUIDFromBytes(keyString.getBytes(StandardCharsets.UTF_8)).toString()); + } Review Comment: Thanks for the guidance, fixed it. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org