kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch 2.2 updated: HOTFIX: Close unused ColumnFamilyHandle (#6893)
Date Thu, 06 Jun 2019 18:29:54 GMT
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 <sophie@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 <matthias@confluent.io>, Guozhang Wang <wangguoz@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) {


Mime
View raw message