Skip to content

Commit

Permalink
Set default format_version to 5 for RocksDB databases (#4480)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari authored Aug 16, 2024
1 parent 999cd0f commit 8c7dea6
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private RocksDB initializeRocksDBWithBookieConf(String basePath, String subPath,
int blockSize = conf.getInt(ROCKSDB_BLOCK_SIZE, 64 * 1024);
int bloomFilterBitsPerKey = conf.getInt(ROCKSDB_BLOOM_FILTERS_BITS_PER_KEY, 10);
boolean lz4CompressionEnabled = conf.getBoolean(ROCKSDB_LZ4_COMPRESSION_ENABLED, true);
int formatVersion = conf.getInt(ROCKSDB_FORMAT_VERSION, 2);
int formatVersion = conf.getInt(ROCKSDB_FORMAT_VERSION, 5);

if (lz4CompressionEnabled) {
options.setCompressionType(CompressionType.LZ4_COMPRESSION);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@
#no default setting in CFOptions

[TableOptions/BlockBasedTable "default"]
# set by jni: tableOptions.setFormatVersion
format_version=5
# set by jni: tableOptions.setChecksumType
checksum=kxxHash
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# set by jni: tableOptions.setBlockCache, default value is: maxDirectMemory() / ledgerDirsSize / 10;
block_cache=206150041
# set by jni: tableOptions.setFormatVersion
format_version=2
format_version=5
# set by jni: tableOptions.setChecksumType
checksum=kxxHash
# set by jni: tableOptions.setFilterPolicy, bloomfilter:[bits_per_key]:[use_block_based_builder]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
keep_log_file_num=30
# 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
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# set by jni: tableOptions.setBlockCache, default value is: maxDirectMemory() / ledgerDirsSize / 10;
block_cache=206150041
# set by jni: tableOptions.setFormatVersion
format_version=2
format_version=5
# set by jni: tableOptions.setChecksumType
checksum=kxxHash
# set by jni: tableOptions.setFilterPolicy, bloomfilter:[bits_per_key]:[use_block_based_builder]
Expand Down
2 changes: 1 addition & 1 deletion conf/bk_server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ gcEntryLogMetadataCacheEnabled=false
# dbStorage_rocksDB_numFilesInLevel0=4
# dbStorage_rocksDB_maxSizeInLevel1MB=256
# dbStorage_rocksDB_logPath=
# dbStorage_rocksDB_format_version=2
# dbStorage_rocksDB_format_version=5

#############################################################################
## DirectIO entry logger configuration
Expand Down
2 changes: 2 additions & 0 deletions conf/default_rocksdb.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@
#no default setting in CFOptions

[TableOptions/BlockBasedTable "default"]
# set by jni: tableOptions.setFormatVersion
format_version=5
# set by jni: tableOptions.setChecksumType
checksum=kxxHash
2 changes: 1 addition & 1 deletion conf/entry_location_rocksdb.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# set by jni: tableOptions.setBlockCache, default value is: maxDirectMemory() / ledgerDirsSize / 10;
block_cache=206150041
# set by jni: tableOptions.setFormatVersion
format_version=2
format_version=5
# set by jni: tableOptions.setChecksumType
checksum=kxxHash
# set by jni: tableOptions.setFilterPolicy, bloomfilter:[bits_per_key]:[use_block_based_builder]
Expand Down
4 changes: 3 additions & 1 deletion conf/ledger_metadata_rocksdb.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
keep_log_file_num=30
# 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

0 comments on commit 8c7dea6

Please sign in to comment.