You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2019/06/06 18:29:54 UTC

[kafka] branch 2.2 updated: HOTFIX: Close unused ColumnFamilyHandle (#6893)

This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch 2.2
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.2 by this push:
     new 0db64f6  HOTFIX: Close unused ColumnFamilyHandle (#6893)
0db64f6 is described below

commit 0db64f6828818adbd72354310f1b2bac06763346
Author: A. Sophie Blee-Goldman <so...@confluent.io>
AuthorDate: Thu Jun 6 11:29:39 2019 -0700

    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 <ma...@confluent.io>, Guozhang Wang <wa...@gmail.com>
---
 .../apache/kafka/streams/state/internals/RocksDBTimestampedStore.java    | 1 +
 1 file changed, 1 insertion(+)

diff --git a/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStore.java b/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStore.java
index 6d477bd..1d773cd 100644
--- a/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStore.java
+++ b/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStore.java
@@ -75,6 +75,7 @@ public class RocksDBTimestampedStore extends RocksDBStore {
             } else {
                 log.info("Opening store {} in regular mode", name);
                 dbAccessor = new SingleColumnFamilyAccessor(columnFamilies.get(1));
+                noTimestampColumnFamily.close();
             }
             noTimestampsIter.close();
         } catch (final RocksDBException e) {