rob-9 commented on code in PR #1094:
URL: https://github.com/apache/flink-agents/pull/1094#discussion_r3964509794


##########
runtime/src/main/java/org/apache/flink/agents/runtime/actionstate/ActionStateUtil.java:
##########
@@ -222,8 +222,11 @@ private static String generateUUIDForEvent(Event event) 
throws IOException {
     }
 
     private static String generateUUIDForAction(Action action) throws 
IOException {
+        // Action.hashCode() folds in JavaFunction's Class[] parameterTypes, 
and Class.hashCode()
+        // is the per-JVM identity hash — so the hash-derived UUID changes on 
every process
+        // restart and recovery lookups can never hit. Derive from the 
plan-unique action name,
+        // which is stable across restarts.
         return String.valueOf(
-                UUID.nameUUIDFromBytes(
-                        
String.valueOf(action.hashCode()).getBytes(StandardCharsets.UTF_8)));
+                
UUID.nameUUIDFromBytes(action.getName().getBytes(StandardCharsets.UTF_8)));

Review Comment:
   Ok! A fresh topic/table would still allow completed actions to repeat if the 
job restores from an older checkpoint, since their saved results are 
unavailable.



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