[
https://issues.apache.org/jira/browse/KAFKA-9356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17006972#comment-17006972
]
Boyang Chen commented on KAFKA-9356:
------------------------------------
Thanks for the report. For Streams there is only one writer (stream thread) and
one reader (IQ) working on the same in-memory store. So a read-write operation
should be safe in this case.
cc [~ableegoldman] [~guozhang]
> Potential data loss in InMemoryWindowStore and InMemorySessionStore
> -------------------------------------------------------------------
>
> Key: KAFKA-9356
> URL: https://issues.apache.org/jira/browse/KAFKA-9356
> Project: Kafka
> Issue Type: Bug
> Reporter: Roman Leventov
> Priority: Major
>
> {{InMemoryWindowStore.put()}} and {{InMemorySessionStore.put()}} call
> {{computeIfAbsent()}} method on {{ConcurrentSkipListMap}} objects which opens
> up possibility for data loss because
> {{ConcurrentSkipListMap.computeIfAbsent()}} is not an atomic operation.
> Possible fix: replace {{ConcurrentSkipListMaps with synchronized[Sorted,
> Navigable]Map(new TreeMap<>())}}.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)