You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Robert Metzger (Jira)" <ji...@apache.org> on 2020/10/05 06:02:00 UTC
[jira] [Updated] (FLINK-19331) State processor api has native
resouce leak when working with RocksDB
[ https://issues.apache.org/jira/browse/FLINK-19331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Metzger updated FLINK-19331:
-----------------------------------
Component/s: API / State Processor
> 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
> Components: API / State Processor
> 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)