[
https://issues.apache.org/jira/browse/FLINK-19331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-19331:
-----------------------------------
Labels: pull-request-available (was: )
> State processor api has native resouce leak when working with RocksDB
> ---------------------------------------------------------------------
>
> Key: FLINK-19331
> URL: https://issues.apache.org/jira/browse/FLINK-19331
> Project: Flink
> Issue Type: Bug
> Affects Versions: 1.12.0
> Reporter: Seth Wiesman
> Assignee: Seth Wiesman
> Priority: Major
> Labels: pull-request-available
>
> State processor api uses AbstractStateBackend#getKeys and
> AbstractStateBackend#getKeysAndNamespaces to iterate over keys and namespaces
> in a savepoint. These methods return java.util.stream.Stream. The
> RocksDBKeyedStateBackend implemention of these methods use streams onClose
> callback to free native resources.
> However, spa eagerly turns this stream into an iterator. This causes the
> onClose method to be discarded leading to a native resource leak. This can
> lead to a segmentation fault when multiple spa jobs are submitted to the same
> session cluster.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)