[
https://issues.apache.org/jira/browse/FLINK-5961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17203045#comment-17203045
]
Kostas Kloudas commented on FLINK-5961:
---------------------------------------
[~azagrebin] yes I agree! Sorry for the late reply.
> Queryable State is broken for HeapKeyedStateBackend
> ---------------------------------------------------
>
> Key: FLINK-5961
> URL: https://issues.apache.org/jira/browse/FLINK-5961
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Queryable State
> Affects Versions: 1.2.0
> Reporter: Stefan Richter
> Priority: Major
>
> The current implementation of queryable state on `HeapKeyedStateBackend`
> attempts to handle concurrency by using `ConcurrentHashMap`s as datastructure.
> However, the implementation has at least two issues:
> 1) Concurrent modifications of state objects: state can be modified
> concurrently to a query, e.g. an element being removed from a list. This can
> result in exceptions or incorrect results.
> 2) StateDescriptor is indicating whether a `ConcurrentHashMap` is required
> because queryable state is active. On restore, this information is unknown at
> first and the implementation always uses plain hash maps. When the state is
> then finally registered, all previously existing maps are not thread-safe.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)