You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/10/12 09:47:19 UTC
[GitHub] [bookkeeper] eolivelli commented on a diff in pull request #3523: Make the rocksDB configuration compatible with previous versions
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: commits-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org