You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Roman Leventov (Jira)" <ji...@apache.org> on 2020/01/02 10:57:00 UTC
[jira] [Updated] (KAFKA-9356) Potential data loss in
InMemoryWindowStore and InMemorySessionStore
[ https://issues.apache.org/jira/browse/KAFKA-9356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman Leventov updated KAFKA-9356:
----------------------------------
Description:
{{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<>())}}.
was:
{{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 {{ConcurrentSkipListMap}}s with {{synchronized[Sorted, Navigable]Map(new TreeMap<>())}}.
> 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)