Myasuka commented on a change in pull request #18387:
URL: https://github.com/apache/flink/pull/18387#discussion_r787316200



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/PartitionableListState.java
##########
@@ -45,23 +47,25 @@
     private final ArrayListSerializer<S> internalListCopySerializer;
 
     PartitionableListState(RegisteredOperatorStateBackendMetaInfo<S> 
stateMetaInfo) {
-        this(stateMetaInfo, new ArrayList<S>());
+        this(stateMetaInfo, new ArrayList<>(), 
stateMetaInfo.getPartitionStateSerializer());
+    }
+
+    // constructor for deep copy.
+    private PartitionableListState(PartitionableListState<S> toCopy) {
+        this(
+                toCopy.stateMetaInfo.deepCopy(),
+                toCopy.internalListCopySerializer.copy(toCopy.internalList),
+                
toCopy.stateMetaInfo.getPartitionStateSerializer().duplicate());

Review comment:
       You are right, I will close the original ticket. Thanks for the review!




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