You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/09/02 18:54:21 UTC

[GitHub] [bookkeeper] mauricebarnum commented on a change in pull request #2775: [STREAMSTORAGE] support an optional time to live (TTL) on a per table basis

mauricebarnum commented on a change in pull request #2775:
URL: https://github.com/apache/bookkeeper/pull/2775#discussion_r701342644



##########
File path: stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java
##########
@@ -367,11 +376,35 @@ protected void openRocksdb(StateStoreSpec spec) throws StateStoreException {
             }
 
             List<ColumnFamilyHandle> cfHandles = Lists.newArrayListWithExpectedSize(2);
-            RocksDB db = RocksDB.open(
-                options,
-                dbDir.getAbsolutePath(),
-                Lists.newArrayList(metaDesc, dataDesc),
-                cfHandles);
+
+            RocksDB db = TtlDB.open(

Review comment:
       Updated to check that an existing DB is being opened with a TTL settings compatible with a previous open.  This provides a better error indication upon a mismatch.  This also avoids re-playing a writeahead log against the wrong implementation; this isn't a current concern but a subtle bug if someone changes the code to use a local WAL.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org