This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-4.17
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/branch-4.17 by this push:
new d237f0927b fix[rocksdb]: fix error rocksdb default config for
CFOptions (#4466)
d237f0927b is described below
commit d237f0927b212f1d85d07c1993b9201af3d40e9b
Author: Aurora Twinkle <[email protected]>
AuthorDate: Sun Jul 21 05:48:11 2024 +0800
fix[rocksdb]: fix error rocksdb default config for CFOptions (#4466)
* fix[rocksdb]: fix error rocksdb default config for CFOptions
---------
Co-authored-by: duanlinlin <[email protected]>
(cherry picked from commit 4ca020a5f0805a748a1e8d983015e5221a534fd7)
---
.../src/test/resources/conf/default_rocksdb.conf | 11 ++++++++---
.../resources/conf/entry_location_rocksdb.conf | 4 ++--
.../resources/conf/ledger_metadata_rocksdb.conf | 11 ++++++++---
.../resources/test_entry_location_rocksdb.conf | 22 +++++++++++++++++++++-
conf/default_rocksdb.conf.default | 9 +++++++--
conf/entry_location_rocksdb.conf.default | 8 ++++++--
conf/ledger_metadata_rocksdb.conf.default | 11 ++++++++---
7 files changed, 60 insertions(+), 16 deletions(-)
diff --git a/bookkeeper-server/src/test/resources/conf/default_rocksdb.conf
b/bookkeeper-server/src/test/resources/conf/default_rocksdb.conf
index 2dbecf36c3..ae013f278e 100644
--- a/bookkeeper-server/src/test/resources/conf/default_rocksdb.conf
+++ b/bookkeeper-server/src/test/resources/conf/default_rocksdb.conf
@@ -23,9 +23,14 @@
info_log_level=INFO_LEVEL
# set by jni: options.setKeepLogFileNum
keep_log_file_num=30
-
-[CFOptions "default"]
# set by jni: options.setLogFileTimeToRoll
log_file_time_to_roll=86400
+
+ [CFOptions "default"]
+ #no default setting in CFOptions
+
+[TableOptions/BlockBasedTable "default"]
# set by jni: tableOptions.setFormatVersion
- format_version=5
\ No newline at end of file
+ format_version=5
+ # set by jni: tableOptions.setChecksumType
+ checksum=kxxHash
diff --git
a/bookkeeper-server/src/test/resources/conf/entry_location_rocksdb.conf
b/bookkeeper-server/src/test/resources/conf/entry_location_rocksdb.conf
index 0ccc7cb37a..976e53b47b 100644
--- a/bookkeeper-server/src/test/resources/conf/entry_location_rocksdb.conf
+++ b/bookkeeper-server/src/test/resources/conf/entry_location_rocksdb.conf
@@ -26,7 +26,7 @@
# set by jni: options.setLogFileTimeToRoll
log_file_time_to_roll=86400
# set by jni: options.setMaxBackgroundJobs or options.setIncreaseParallelism
- max_background_jobs=2
+ max_background_jobs=32
# set by jni: options.setMaxSubcompactions
max_subcompactions=1
# set by jni: options.setMaxTotalWalSize
@@ -57,7 +57,7 @@
[TableOptions/BlockBasedTable "default"]
# set by jni: tableOptions.setBlockSize
block_size=65536
- # set by jni: tableOptions.setBlockCache
+# set by jni: tableOptions.setBlockCache, default value is: maxDirectMemory()
/ ledgerDirsSize / 10;
block_cache=206150041
# set by jni: tableOptions.setFormatVersion
format_version=5
diff --git
a/bookkeeper-server/src/test/resources/conf/ledger_metadata_rocksdb.conf
b/bookkeeper-server/src/test/resources/conf/ledger_metadata_rocksdb.conf
index 2dbecf36c3..ae013f278e 100644
--- a/bookkeeper-server/src/test/resources/conf/ledger_metadata_rocksdb.conf
+++ b/bookkeeper-server/src/test/resources/conf/ledger_metadata_rocksdb.conf
@@ -23,9 +23,14 @@
info_log_level=INFO_LEVEL
# set by jni: options.setKeepLogFileNum
keep_log_file_num=30
-
-[CFOptions "default"]
# set by jni: options.setLogFileTimeToRoll
log_file_time_to_roll=86400
+
+ [CFOptions "default"]
+ #no default setting in CFOptions
+
+[TableOptions/BlockBasedTable "default"]
# set by jni: tableOptions.setFormatVersion
- format_version=5
\ No newline at end of file
+ format_version=5
+ # set by jni: tableOptions.setChecksumType
+ checksum=kxxHash
diff --git
a/bookkeeper-server/src/test/resources/test_entry_location_rocksdb.conf
b/bookkeeper-server/src/test/resources/test_entry_location_rocksdb.conf
index 1defdf4fc1..7640fd2c9e 100644
--- a/bookkeeper-server/src/test/resources/test_entry_location_rocksdb.conf
+++ b/bookkeeper-server/src/test/resources/test_entry_location_rocksdb.conf
@@ -19,10 +19,22 @@
[DBOptions]
# set by jni: options.setCreateIfMissing
create_if_missing=true
+ # set by jni: options.setInfoLogLevel
+ info_log_level=INFO_LEVEL
# set by jni: options.setKeepLogFileNum
keep_log_file_num=1
+ # set by jni: options.setLogFileTimeToRoll
+ log_file_time_to_roll=86400
+ # set by jni: options.setMaxBackgroundJobs or options.setIncreaseParallelism
+ max_background_jobs=32
+ # set by jni: options.setMaxSubcompactions
+ max_subcompactions=1
# set by jni: options.setMaxTotalWalSize
max_total_wal_size=1000
+ # set by jni: options.setMaxOpenFiles
+ max_open_files=-1
+ # set by jni: options.setDeleteObsoleteFilesPeriodMicros
+ delete_obsolete_files_period_micros=3600000000
[CFOptions "default"]
# set by jni: options.setCompressionType
@@ -31,13 +43,21 @@
write_buffer_size=1024
# set by jni: options.setMaxWriteBufferNumber
max_write_buffer_number=1
+ # set by jni: options.setNumLevels
+ num_levels=7
+ # set by jni: options.setLevelZeroFileNumCompactionTrigger
+ level0_file_num_compaction_trigger=4
+ # set by jni: options.setMaxBytesForLevelBase
+ max_bytes_for_level_base=268435456
+ # set by jni: options.setTargetFileSizeBase
+ target_file_size_base=67108864
# set by jni: options.setLevelCompactionDynamicLevelBytes
level_compaction_dynamic_level_bytes=true
[TableOptions/BlockBasedTable "default"]
# set by jni: tableOptions.setBlockSize
block_size=65536
- # set by jni: tableOptions.setBlockCache
+# set by jni: tableOptions.setBlockCache, default value is: maxDirectMemory()
/ ledgerDirsSize / 10;
block_cache=206150041
# set by jni: tableOptions.setFormatVersion
format_version=5
diff --git a/conf/default_rocksdb.conf.default
b/conf/default_rocksdb.conf.default
index 80d504ba43..ccedbb79eb 100644
--- a/conf/default_rocksdb.conf.default
+++ b/conf/default_rocksdb.conf.default
@@ -16,6 +16,10 @@
# * limitations under the License.
# */
+# When modifying this file, please also modify the configuration files(at
+# bookkeeper-server/src/test/resources/conf) in the
+# test case to ensure unit test coverage.
+
[DBOptions]
# set by jni: options.setCreateIfMissing
create_if_missing=true
@@ -23,11 +27,12 @@
info_log_level=INFO_LEVEL
# set by jni: options.setKeepLogFileNum
keep_log_file_num=30
-
-[CFOptions "default"]
# set by jni: options.setLogFileTimeToRoll
log_file_time_to_roll=86400
+ [CFOptions "default"]
+ #no default setting in CFOptions
+
[TableOptions/BlockBasedTable "default"]
# set by jni: tableOptions.setFormatVersion
format_version=5
diff --git a/conf/entry_location_rocksdb.conf.default
b/conf/entry_location_rocksdb.conf.default
index 0ccc7cb37a..e4dc394243 100644
--- a/conf/entry_location_rocksdb.conf.default
+++ b/conf/entry_location_rocksdb.conf.default
@@ -16,6 +16,10 @@
# * limitations under the License.
# */
+# When modifying this file, please also modify the configuration files(at
+# bookkeeper-server/src/test/resources/conf) in the
+# test case to ensure unit test coverage.
+
[DBOptions]
# set by jni: options.setCreateIfMissing
create_if_missing=true
@@ -26,7 +30,7 @@
# set by jni: options.setLogFileTimeToRoll
log_file_time_to_roll=86400
# set by jni: options.setMaxBackgroundJobs or options.setIncreaseParallelism
- max_background_jobs=2
+ max_background_jobs=32
# set by jni: options.setMaxSubcompactions
max_subcompactions=1
# set by jni: options.setMaxTotalWalSize
@@ -57,7 +61,7 @@
[TableOptions/BlockBasedTable "default"]
# set by jni: tableOptions.setBlockSize
block_size=65536
- # set by jni: tableOptions.setBlockCache
+ # set by jni: tableOptions.setBlockCache, default value is: maxDirectMemory()
/ ledgerDirsSize / 10;
block_cache=206150041
# set by jni: tableOptions.setFormatVersion
format_version=5
diff --git a/conf/ledger_metadata_rocksdb.conf.default
b/conf/ledger_metadata_rocksdb.conf.default
index 80d504ba43..4d3807983d 100644
--- a/conf/ledger_metadata_rocksdb.conf.default
+++ b/conf/ledger_metadata_rocksdb.conf.default
@@ -16,6 +16,10 @@
# * limitations under the License.
# */
+# When modifying this file, please also modify the configuration files(at
+# bookkeeper-server/src/test/resources/conf) in the
+# test case to ensure unit test coverage.
+
[DBOptions]
# set by jni: options.setCreateIfMissing
create_if_missing=true
@@ -23,13 +27,14 @@
info_log_level=INFO_LEVEL
# set by jni: options.setKeepLogFileNum
keep_log_file_num=30
-
-[CFOptions "default"]
# set by jni: options.setLogFileTimeToRoll
log_file_time_to_roll=86400
+ [CFOptions "default"]
+ #no default setting in CFOptions
+
[TableOptions/BlockBasedTable "default"]
# set by jni: tableOptions.setFormatVersion
format_version=5
# set by jni: tableOptions.setChecksumType
- checksum=kxxHash
\ No newline at end of file
+ checksum=kxxHash