Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-19331

State processor api has native resouce leak when working with RocksDB

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              sjwiesman Seth Wiesman
              sjwiesman Seth Wiesman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: