JinkunLiu commented on code in PR #950:
URL: https://github.com/apache/flink-agents/pull/950#discussion_r3887720590


##########
api/src/main/java/org/apache/flink/agents/api/Event.java:
##########
@@ -135,11 +171,12 @@ public boolean equals(Object o) {
         Event other = (Event) o;
         return Objects.equals(this.id, other.id)
                 && Objects.equals(this.getType(), other.getType())
-                && Objects.equals(this.attributes, other.attributes);
+                && Objects.equals(this.attributes, other.attributes)
+                && Objects.equals(this.attachments, other.attachments);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(id, getType(), attributes);
+        return Objects.hash(id, getType(), attributes, attachments);

Review Comment:
   Thanks for point that. I think the case you described can occur when durable 
execution is enabled.
   
   However, I do not see a simple fix that fits within this PR. Maybe we need 
to redesign `generateUUIDForEvent`, perhaps by introducing a new ID to identify 
each event occurrence is better than deriving the `Event` identity from values 
carried.
   
   Do you have any suggestions on this? I would appreciate your thoughts.



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