Skip to content

Commit 4ca020a

Browse files
AuroraTwinkleduanlinlin
and
duanlinlin
authored
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]>
1 parent 15b106c commit 4ca020a

7 files changed

+59
-15
lines changed

bookkeeper-server/src/test/resources/conf/default_rocksdb.conf

+8-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
info_log_level=INFO_LEVEL
2424
# set by jni: options.setKeepLogFileNum
2525
keep_log_file_num=30
26-
27-
[CFOptions "default"]
2826
# set by jni: options.setLogFileTimeToRoll
29-
log_file_time_to_roll=86400
27+
log_file_time_to_roll=86400
28+
29+
[CFOptions "default"]
30+
#no default setting in CFOptions
31+
32+
[TableOptions/BlockBasedTable "default"]
33+
# set by jni: tableOptions.setChecksumType
34+
checksum=kxxHash

bookkeeper-server/src/test/resources/conf/entry_location_rocksdb.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# set by jni: options.setLogFileTimeToRoll
2727
log_file_time_to_roll=86400
2828
# set by jni: options.setMaxBackgroundJobs or options.setIncreaseParallelism
29-
max_background_jobs=2
29+
max_background_jobs=32
3030
# set by jni: options.setMaxSubcompactions
3131
max_subcompactions=1
3232
# set by jni: options.setMaxTotalWalSize
@@ -57,7 +57,7 @@
5757
[TableOptions/BlockBasedTable "default"]
5858
# set by jni: tableOptions.setBlockSize
5959
block_size=65536
60-
# set by jni: tableOptions.setBlockCache
60+
# set by jni: tableOptions.setBlockCache, default value is: maxDirectMemory() / ledgerDirsSize / 10;
6161
block_cache=206150041
6262
# set by jni: tableOptions.setFormatVersion
6363
format_version=2

bookkeeper-server/src/test/resources/conf/ledger_metadata_rocksdb.conf

+8-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
info_log_level=INFO_LEVEL
2424
# set by jni: options.setKeepLogFileNum
2525
keep_log_file_num=30
26-
27-
[CFOptions "default"]
2826
# set by jni: options.setLogFileTimeToRoll
29-
log_file_time_to_roll=86400
27+
log_file_time_to_roll=86400
28+
29+
[CFOptions "default"]
30+
#no default setting in CFOptions
31+
32+
[TableOptions/BlockBasedTable "default"]
33+
# set by jni: tableOptions.setChecksumType
34+
checksum=kxxHash

bookkeeper-server/src/test/resources/test_entry_location_rocksdb.conf

+21-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,22 @@
1919
[DBOptions]
2020
# set by jni: options.setCreateIfMissing
2121
create_if_missing=true
22+
# set by jni: options.setInfoLogLevel
23+
info_log_level=INFO_LEVEL
2224
# set by jni: options.setKeepLogFileNum
2325
keep_log_file_num=1
26+
# set by jni: options.setLogFileTimeToRoll
27+
log_file_time_to_roll=86400
28+
# set by jni: options.setMaxBackgroundJobs or options.setIncreaseParallelism
29+
max_background_jobs=32
30+
# set by jni: options.setMaxSubcompactions
31+
max_subcompactions=1
2432
# set by jni: options.setMaxTotalWalSize
2533
max_total_wal_size=1000
34+
# set by jni: options.setMaxOpenFiles
35+
max_open_files=-1
36+
# set by jni: options.setDeleteObsoleteFilesPeriodMicros
37+
delete_obsolete_files_period_micros=3600000000
2638

2739
[CFOptions "default"]
2840
# set by jni: options.setCompressionType
@@ -31,13 +43,21 @@
3143
write_buffer_size=1024
3244
# set by jni: options.setMaxWriteBufferNumber
3345
max_write_buffer_number=1
46+
# set by jni: options.setNumLevels
47+
num_levels=7
48+
# set by jni: options.setLevelZeroFileNumCompactionTrigger
49+
level0_file_num_compaction_trigger=4
50+
# set by jni: options.setMaxBytesForLevelBase
51+
max_bytes_for_level_base=268435456
52+
# set by jni: options.setTargetFileSizeBase
53+
target_file_size_base=67108864
3454
# set by jni: options.setLevelCompactionDynamicLevelBytes
3555
level_compaction_dynamic_level_bytes=true
3656

3757
[TableOptions/BlockBasedTable "default"]
3858
# set by jni: tableOptions.setBlockSize
3959
block_size=65536
40-
# set by jni: tableOptions.setBlockCache
60+
# set by jni: tableOptions.setBlockCache, default value is: maxDirectMemory() / ledgerDirsSize / 10;
4161
block_cache=206150041
4262
# set by jni: tableOptions.setFormatVersion
4363
format_version=2

conf/default_rocksdb.conf.default

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,23 @@
1616
# * limitations under the License.
1717
# */
1818

19+
# When modifying this file, please also modify the configuration files(at
20+
# bookkeeper-server/src/test/resources/conf) in the
21+
# test case to ensure unit test coverage.
22+
1923
[DBOptions]
2024
# set by jni: options.setCreateIfMissing
2125
create_if_missing=true
2226
# set by jni: options.setInfoLogLevel
2327
info_log_level=INFO_LEVEL
2428
# set by jni: options.setKeepLogFileNum
2529
keep_log_file_num=30
26-
27-
[CFOptions "default"]
2830
# set by jni: options.setLogFileTimeToRoll
2931
log_file_time_to_roll=86400
3032

33+
[CFOptions "default"]
34+
#no default setting in CFOptions
35+
3136
[TableOptions/BlockBasedTable "default"]
3237
# set by jni: tableOptions.setChecksumType
3338
checksum=kxxHash

conf/entry_location_rocksdb.conf.default

+6-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
# * limitations under the License.
1717
# */
1818

19+
# When modifying this file, please also modify the configuration files(at
20+
# bookkeeper-server/src/test/resources/conf) in the
21+
# test case to ensure unit test coverage.
22+
1923
[DBOptions]
2024
# set by jni: options.setCreateIfMissing
2125
create_if_missing=true
@@ -26,7 +30,7 @@
2630
# set by jni: options.setLogFileTimeToRoll
2731
log_file_time_to_roll=86400
2832
# set by jni: options.setMaxBackgroundJobs or options.setIncreaseParallelism
29-
max_background_jobs=2
33+
max_background_jobs=32
3034
# set by jni: options.setMaxSubcompactions
3135
max_subcompactions=1
3236
# set by jni: options.setMaxTotalWalSize
@@ -57,7 +61,7 @@
5761
[TableOptions/BlockBasedTable "default"]
5862
# set by jni: tableOptions.setBlockSize
5963
block_size=65536
60-
# set by jni: tableOptions.setBlockCache
64+
# set by jni: tableOptions.setBlockCache, default value is: maxDirectMemory() / ledgerDirsSize / 10;
6165
block_cache=206150041
6266
# set by jni: tableOptions.setFormatVersion
6367
format_version=2

conf/ledger_metadata_rocksdb.conf.default

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,22 @@
1616
# * limitations under the License.
1717
# */
1818

19+
# When modifying this file, please also modify the configuration files(at
20+
# bookkeeper-server/src/test/resources/conf) in the
21+
# test case to ensure unit test coverage.
22+
1923
[DBOptions]
2024
# set by jni: options.setCreateIfMissing
2125
create_if_missing=true
2226
# set by jni: options.setInfoLogLevel
2327
info_log_level=INFO_LEVEL
2428
# set by jni: options.setKeepLogFileNum
2529
keep_log_file_num=30
26-
27-
[CFOptions "default"]
2830
# set by jni: options.setLogFileTimeToRoll
2931
log_file_time_to_roll=86400
32+
33+
[CFOptions "default"]
34+
#no default setting in CFOptions
3035

3136
[TableOptions/BlockBasedTable "default"]
3237
# set by jni: tableOptions.setChecksumType

0 commit comments

Comments
 (0)