flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl0u <...@git.apache.org>
Subject [GitHub] flink issue #5691: [FLINK-8802] [QS] Fix concurrent access to non-duplicated...
Date Tue, 20 Mar 2018 05:02:46 GMT
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 <notifications@github.com> 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>.
    > 
    



---

Mime
View raw message