Browse Source

HOTFIX: Close unused ColumnFamilyHandle (#6893)

In RocksDBTimestampedStore#openRocksDB we try to open a db with two column families. If this succeeds but the first column family is empty (db.newIterator.seekToFirst.isValid() == false) we never actually close its ColumnFamilyHandle

Reviewers: Matthias J. Sax <matthias@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
pull/6897/head
A. Sophie Blee-Goldman 6 years ago committed by Guozhang Wang
parent
commit
30adf2a096
  1. 1
      streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStore.java

1
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStore.java

@ -81,6 +81,7 @@ public class RocksDBTimestampedStore extends RocksDBStore implements Timestamped
} else { } else {
log.info("Opening store {} in regular mode", name); log.info("Opening store {} in regular mode", name);
dbAccessor = new SingleColumnFamilyAccessor(columnFamilies.get(1)); dbAccessor = new SingleColumnFamilyAccessor(columnFamilies.get(1));
noTimestampColumnFamily.close();
} }
noTimestampsIter.close(); noTimestampsIter.close();
} catch (final RocksDBException e) { } catch (final RocksDBException e) {

Loading…
Cancel
Save