[ 
https://issues.apache.org/jira/browse/FLINK-25494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yun Tang updated FLINK-25494:
-----------------------------
    Description: 
Currently, during 
DefaultOperatorStateBackendSnapshotStrategy#syncPrepareResources, it will copy 
the array list serializer via PartitionableListState#deepCopy. However, it just 
initialize another ArrayListSerializer and not duplicate the internal state 
serializer:

 

See "{{{}internalListCopySerializer{}}}":
 
{code:java}
private PartitionableListState(
        RegisteredOperatorStateBackendMetaInfo<S> stateMetaInfo, ArrayList<S> 
internalList) {

    this.stateMetaInfo = Preconditions.checkNotNull(stateMetaInfo);
    this.internalList = Preconditions.checkNotNull(internalList);
    this.internalListCopySerializer =
            new 
ArrayListSerializer<>(stateMetaInfo.getPartitionStateSerializer());
} {code}
 

This would cause unexpected problem with the usage of kryo serializer.

  was:
Currently, during 
DefaultOperatorStateBackendSnapshotStrategy#syncPrepareResources, it will copy 
the array list serializer via PartitionableListState#deepCopy. However, it just 
initialize another ArrayListSerializer and not duplicate the internal state 
serializer:

 

See "{{{}internalListCopySerializer{}}}":
 
{code:java}
private PartitionableListState(
        RegisteredOperatorStateBackendMetaInfo<S> stateMetaInfo, ArrayList<S> 
internalList) {

    this.stateMetaInfo = Preconditions.checkNotNull(stateMetaInfo);
    this.internalList = Preconditions.checkNotNull(internalList);
    this.internalListCopySerializer =
            new 
ArrayListSerializer<>(stateMetaInfo.getPartitionStateSerializer());
} {code}
 

This would cause unexpected problem with usage of kryo serializer.


> Duplicate element serializer during 
> DefaultOperatorStateBackendSnapshotStrategy#syncPrepareResources
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-25494
>                 URL: https://issues.apache.org/jira/browse/FLINK-25494
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / State Backends
>            Reporter: Yun Tang
>            Assignee: Yun Tang
>            Priority: Major
>             Fix For: 1.15.0, 1.13.6, 1.14.3
>
>
> Currently, during 
> DefaultOperatorStateBackendSnapshotStrategy#syncPrepareResources, it will 
> copy the array list serializer via PartitionableListState#deepCopy. However, 
> it just initialize another ArrayListSerializer and not duplicate the internal 
> state serializer:
>  
> See "{{{}internalListCopySerializer{}}}":
>  
> {code:java}
> private PartitionableListState(
>         RegisteredOperatorStateBackendMetaInfo<S> stateMetaInfo, ArrayList<S> 
> internalList) {
>     this.stateMetaInfo = Preconditions.checkNotNull(stateMetaInfo);
>     this.internalList = Preconditions.checkNotNull(internalList);
>     this.internalListCopySerializer =
>             new 
> ArrayListSerializer<>(stateMetaInfo.getPartitionStateSerializer());
> } {code}
>  
> This would cause unexpected problem with the usage of kryo serializer.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to