This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch branch-4.15
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git

commit 6d4942e7c7f1f73c2fe1ee5fcb08db898c8a417d
Author: Aurora Twinkle <foreverlove...@gmail.com>
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 <duanlinl...@xiaohongshu.com>
    (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          |  9 +++++++--
 7 files changed, 59 insertions(+), 15 deletions(-)

diff --git a/bookkeeper-server/src/test/resources/conf/default_rocksdb.conf 
b/bookkeeper-server/src/test/resources/conf/default_rocksdb.conf
index 0f3a08779e..df433a33e9 100644
--- a/bookkeeper-server/src/test/resources/conf/default_rocksdb.conf
+++ b/bookkeeper-server/src/test/resources/conf/default_rocksdb.conf
@@ -23,7 +23,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
\ No newline at end of file
+ log_file_time_to_roll=86400
+
+ [CFOptions "default"]
+ #no default setting in CFOptions
+
+[TableOptions/BlockBasedTable "default"]
+ # set by jni: tableOptions.setChecksumType
+ checksum=kxxHash
\ No newline at end of file
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 6f6c1b4d05..260111fa14 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=2
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 0f3a08779e..f84c0167ed 100644
--- a/bookkeeper-server/src/test/resources/conf/ledger_metadata_rocksdb.conf
+++ b/bookkeeper-server/src/test/resources/conf/ledger_metadata_rocksdb.conf
@@ -23,7 +23,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
\ No newline at end of file
+ log_file_time_to_roll=86400
+ 
+ [CFOptions "default"]
+ #no default setting in CFOptions
+
+[TableOptions/BlockBasedTable "default"]
+ # set by jni: tableOptions.setChecksumType
+ checksum=kxxHash
\ No newline at end of file
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 fa3cf9c8d9..4edd094a3c 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,11 +43,19 @@
  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
 
 [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=2
diff --git a/conf/default_rocksdb.conf.default 
b/conf/default_rocksdb.conf.default
index e9b8e7c3ec..d8a77dd9d3 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.setChecksumType
  checksum=kxxHash
\ No newline at end of file
diff --git a/conf/entry_location_rocksdb.conf.default 
b/conf/entry_location_rocksdb.conf.default
index 6f6c1b4d05..4d5ce58a85 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=2
diff --git a/conf/ledger_metadata_rocksdb.conf.default 
b/conf/ledger_metadata_rocksdb.conf.default
index e9b8e7c3ec..0bf7934922 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,10 +27,11 @@
  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.setChecksumType

Reply via email to