Kohei Nozaki created KAFKA-16055:
------------------------------------

             Summary: Thread unsafe use of HashMap stored in 
QueryableStoreProvider#storeProviders
                 Key: KAFKA-16055
                 URL: https://issues.apache.org/jira/browse/KAFKA-16055
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 3.6.1
            Reporter: Kohei Nozaki


This was originally raised in [a kafka-users 
post|https://lists.apache.org/thread/gpct1275bfqovlckptn3lvf683qpoxol].

There is a HashMap stored in QueryableStoreProvider#storeProviders ([code 
link|https://github.com/apache/kafka/blob/3.6.1/streams/src/main/java/org/apache/kafka/streams/state/internals/QueryableStoreProvider.java#L39])
 which can be mutated by a KafkaStreams#removeStreamThread() call. This can be 
problematic when KafkaStreams#store is called from a separate thread.

We need to somehow make this part of code thread-safe by replacing it by 
ConcurrentHashMap or/and using an existing locking mechanism.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to