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

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

Github user kl0u commented on the issue:

    https://github.com/apache/flink/pull/5691
  
    That is because cleaning up the cache is happening from another thread, 
other than the one 
    accessing the serializers, and ThreadLocal does not have a clear() method 
that you can call
    from another thread and clean all the state in it. Each thread can only 
clean its own state.
    
    > On Mar 20, 2018, at 3:34 AM, sihua zhou <[email protected]> wrote:
    > 
    > @sihuazhou commented on this pull request.
    > 
    > In 
flink-runtime/src/main/java/org/apache/flink/runtime/state/internal/InternalQueryableKvState.java
 <https://github.com/apache/flink/pull/5691#discussion_r175640731>:
    > 
    > >         private final boolean areSerializersStateless;
    >  
    > - private final ConcurrentMap<Thread, KvStateInfo<K, N, V>> 
serializerCache;
    > + private final ConcurrentMap<Thread, KvStateInfo<K, N, V>> 
serializerCache = new ConcurrentHashMap<>(4);
    >  
    > nit: just wonder why didn't use ThreadLocal<KvStateInfo<K, N, V>> 
provided by JDK...
    > 
    > —
    > You are receiving this because you authored the thread.
    > Reply to this email directly, view it on GitHub 
<https://github.com/apache/flink/pull/5691#pullrequestreview-105202229>, or 
mute the thread 
<https://github.com/notifications/unsubscribe-auth/ACS1qD3X7x51gg8CHKKLCVJ6aFuOvnthks5tgGqmgaJpZM4SopKO>.
    > 
    



> 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