kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch 2.3 updated: HOTFIX: Close unused ColumnFamilyHandle (#6893)
Date Thu, 06 Jun 2019 18:30:27 GMT
This is an automated email from the ASF dual-hosted git repository.

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


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

commit 5d3244069975eddc378304ff961b0570b1bfebd3
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 05db0ea..74f0919 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
@@ -81,6 +81,7 @@ public class RocksDBTimestampedStore extends RocksDBStore implements Timestamped
             } 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