Skip to content

Commit 3c7b82e

Browse files
lhotarisandeep-ctds
authored andcommitted
Set default format_version to 5 for RocksDB databases (apache#4480)
(cherry picked from commit 8c7dea6) (cherry picked from commit a574381)
1 parent 1a40802 commit 3c7b82e

File tree

9 files changed

+15
-7
lines changed

9 files changed

+15
-7
lines changed

bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ private RocksDB initializeRocksDBWithBookieConf(String basePath, String subPath,
198198
int blockSize = conf.getInt(ROCKSDB_BLOCK_SIZE, 64 * 1024);
199199
int bloomFilterBitsPerKey = conf.getInt(ROCKSDB_BLOOM_FILTERS_BITS_PER_KEY, 10);
200200
boolean lz4CompressionEnabled = conf.getBoolean(ROCKSDB_LZ4_COMPRESSION_ENABLED, true);
201-
int formatVersion = conf.getInt(ROCKSDB_FORMAT_VERSION, 2);
201+
int formatVersion = conf.getInt(ROCKSDB_FORMAT_VERSION, 5);
202202

203203
if (lz4CompressionEnabled) {
204204
options.setCompressionType(CompressionType.LZ4_COMPRESSION);

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@
2626

2727
[CFOptions "default"]
2828
# set by jni: options.setLogFileTimeToRoll
29-
log_file_time_to_roll=86400
29+
log_file_time_to_roll=86400
30+
# set by jni: tableOptions.setFormatVersion
31+
format_version=5

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
# set by jni: tableOptions.setBlockCache
6161
block_cache=206150041
6262
# set by jni: tableOptions.setFormatVersion
63-
format_version=2
63+
format_version=5
6464
# set by jni: tableOptions.setChecksumType
6565
checksum=kxxHash
6666
# set by jni: tableOptions.setFilterPolicy, bloomfilter:[bits_per_key]:[use_block_based_builder]

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@
2626

2727
[CFOptions "default"]
2828
# set by jni: options.setLogFileTimeToRoll
29-
log_file_time_to_roll=86400
29+
log_file_time_to_roll=86400
30+
# set by jni: tableOptions.setFormatVersion
31+
format_version=5

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# set by jni: tableOptions.setBlockCache
4141
block_cache=206150041
4242
# set by jni: tableOptions.setFormatVersion
43-
format_version=2
43+
format_version=5
4444
# set by jni: tableOptions.setChecksumType
4545
checksum=kxxHash
4646
# set by jni: tableOptions.setFilterPolicy, bloomfilter:[bits_per_key]:[use_block_based_builder]

conf/bk_server.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ gcEntryLogMetadataCacheEnabled=false
782782
# dbStorage_rocksDB_numFilesInLevel0=4
783783
# dbStorage_rocksDB_maxSizeInLevel1MB=256
784784
# dbStorage_rocksDB_logPath=
785-
# dbStorage_rocksDB_format_version=2
785+
# dbStorage_rocksDB_format_version=5
786786

787787
#############################################################################
788788
## DirectIO entry logger configuration

conf/default_rocksdb.conf.default

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,7 @@
2929
log_file_time_to_roll=86400
3030

3131
[TableOptions/BlockBasedTable "default"]
32+
# set by jni: tableOptions.setFormatVersion
33+
format_version=5
3234
# set by jni: tableOptions.setChecksumType
3335
checksum=kxxHash

conf/entry_location_rocksdb.conf.default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
# set by jni: tableOptions.setBlockCache
6161
block_cache=206150041
6262
# set by jni: tableOptions.setFormatVersion
63-
format_version=2
63+
format_version=5
6464
# set by jni: tableOptions.setChecksumType
6565
checksum=kxxHash
6666
# set by jni: tableOptions.setFilterPolicy, bloomfilter:[bits_per_key]:[use_block_based_builder]

conf/ledger_metadata_rocksdb.conf.default

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,7 @@
2929
log_file_time_to_roll=86400
3030

3131
[TableOptions/BlockBasedTable "default"]
32+
# set by jni: tableOptions.setFormatVersion
33+
format_version=5
3234
# set by jni: tableOptions.setChecksumType
3335
checksum=kxxHash

0 commit comments

Comments
 (0)