yunfengzhou-hub commented on code in PR #1138:
URL: https://github.com/apache/flink-agents/pull/1138#discussion_r4237152785


##########
runtime/src/main/java/org/apache/flink/agents/runtime/memory/MemoryObjectImpl.java:
##########
@@ -259,6 +259,17 @@ public static final class MemoryItem implements 
Serializable {
             this.subKeys = new HashSet<>();
         }
 
+        /**
+         * Copy constructor producing an item with an independent {@code 
subKeys} set. Used at the
+         * child-memory isolation boundary so the field-list updates that 
{@link #set} and {@link
+         * #fillParents} apply in place stay confined to the copy's own scope.
+         */
+        MemoryItem(MemoryItem other) {
+            this.type = other.type;
+            this.value = other.value;

Review Comment:
   The deep copy of MemoryItem.getValue() is a little more complicated than 
expected, especially for external subagent. After discussion with @pltbkd , I 
think it might be better to isolate memory between parent and child for now, so 
I've just reverted changed related to memory sharing ability.



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