Seth Wiesman created FLINK-19331: ------------------------------------ Summary: 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 Reporter: Seth Wiesman Assignee: Seth Wiesman
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)