[ 
https://issues.apache.org/jira/browse/FLINK-8802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16398531#comment-16398531
 ] 

ASF GitHub Bot commented on FLINK-8802:
---------------------------------------

Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5691#discussion_r174444245
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateEntry.java ---
    @@ -39,29 +39,27 @@
        private final InternalKvState<K, N, V> state;
        private final KvStateInfo<K, N, V> stateInfo;
     
    +   private final boolean isSerializerStateless;
    +
        private final ConcurrentMap<Thread, KvStateInfo<K, N, V>> 
serializerCache;
     
        public KvStateEntry(final InternalKvState<K, N, V> state) {
    -
                this.state = Preconditions.checkNotNull(state);
                this.stateInfo = new KvStateInfo<>(
                                state.getKeySerializer(),
                                state.getNamespaceSerializer(),
                                state.getValueSerializer()
                );
    -
    -           this.serializerCache =
    -                           stateInfo.duplicate() == stateInfo
    -                                           ? null                          
                        // if the serializers are stateless, we do not need a 
cache
    -                                           : new ConcurrentHashMap<>();
    +           this.serializerCache = new ConcurrentHashMap<>();
    +           this.isSerializerStateless = stateInfo.duplicate() == stateInfo;
    --- End diff --
    
    -> areSerializersStateless?


> Concurrent serialization without duplicating serializers in state server.
> -------------------------------------------------------------------------
>
>                 Key: FLINK-8802
>                 URL: https://issues.apache.org/jira/browse/FLINK-8802
>             Project: Flink
>          Issue Type: Bug
>          Components: Queryable State
>    Affects Versions: 1.5.0
>            Reporter: Kostas Kloudas
>            Assignee: Kostas Kloudas
>            Priority: Blocker
>             Fix For: 1.5.0
>
>
> The `getSerializedValue()` may be called by multiple threads but serializers 
> are not duplicated, which may lead to exceptions thrown when a serializer is 
> stateful.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to