eolivelli commented on code in PR #3523:
URL: https://github.com/apache/bookkeeper/pull/3523#discussion_r993241100


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java:
##########
@@ -87,18 +111,33 @@ public KeyValueStorageRocksDB(String basePath, String 
subPath, DbConfigType dbCo
         this.emptyBatch = new WriteBatch();
 
         String dbFilePath = "";
+        if (dbConfigType == DbConfigType.EntryLocation) {
+            dbFilePath = conf.getEntryLocationRocksdbConf();
+        } else if (dbConfigType == DbConfigType.LedgerMetadata) {
+            dbFilePath = conf.getLedgerMetadataRocksdbConf();
+        } else {
+            dbFilePath = conf.getDefaultRocksDBConf();
+        }
+        if (Paths.get(dbFilePath).toFile().exists()) {
+            db = initializeRocksDBWithConfFile(basePath, subPath, 
dbConfigType, conf, readOnly, dbFilePath);

Review Comment:
   here we log that we have found the file



##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java:
##########
@@ -87,18 +111,33 @@ public KeyValueStorageRocksDB(String basePath, String 
subPath, DbConfigType dbCo
         this.emptyBatch = new WriteBatch();
 
         String dbFilePath = "";
+        if (dbConfigType == DbConfigType.EntryLocation) {
+            dbFilePath = conf.getEntryLocationRocksdbConf();
+        } else if (dbConfigType == DbConfigType.LedgerMetadata) {
+            dbFilePath = conf.getLedgerMetadataRocksdbConf();
+        } else {
+            dbFilePath = conf.getDefaultRocksDBConf();
+        }

Review Comment:
   I would add a log line
   `log.info("Searching for a RockDB configuration file in {}", dbFilePath)`
   



##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java:
##########
@@ -87,18 +111,33 @@ public KeyValueStorageRocksDB(String basePath, String 
subPath, DbConfigType dbCo
         this.emptyBatch = new WriteBatch();
 
         String dbFilePath = "";
+        if (dbConfigType == DbConfigType.EntryLocation) {
+            dbFilePath = conf.getEntryLocationRocksdbConf();
+        } else if (dbConfigType == DbConfigType.LedgerMetadata) {
+            dbFilePath = conf.getLedgerMetadataRocksdbConf();
+        } else {
+            dbFilePath = conf.getDefaultRocksDBConf();
+        }
+        if (Paths.get(dbFilePath).toFile().exists()) {
+            db = initializeRocksDBWithConfFile(basePath, subPath, 
dbConfigType, conf, readOnly, dbFilePath);
+        } else {
+            db = initializeRocksDBWithBookieConf(basePath, subPath, 
dbConfigType, conf, readOnly);

Review Comment:
   here we log that we have't found the file and that we will read the 
configuration from the main bookkeeper configuration



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to