@@ -182,6 +182,7 @@ private RocksDB initializeRocksDBWithBookieConf(String basePath, String subPath,
182182 Options options = new Options ();
183183 options .setCreateIfMissing (true );
184184 ChecksumType checksumType = ChecksumType .valueOf (conf .getString (ROCKSDB_CHECKSUM_TYPE , "kxxHash" ));
185+ int formatVersion = conf .getInt (ROCKSDB_FORMAT_VERSION , 5 );
185186
186187 if (dbConfigType == DbConfigType .EntryLocation ) {
187188 /* Set default RocksDB block-cache size to 10% / numberOfLedgers of direct memory, unless override */
@@ -198,7 +199,6 @@ private RocksDB initializeRocksDBWithBookieConf(String basePath, String subPath,
198199 int blockSize = conf .getInt (ROCKSDB_BLOCK_SIZE , 64 * 1024 );
199200 int bloomFilterBitsPerKey = conf .getInt (ROCKSDB_BLOOM_FILTERS_BITS_PER_KEY , 10 );
200201 boolean lz4CompressionEnabled = conf .getBoolean (ROCKSDB_LZ4_COMPRESSION_ENABLED , true );
201- int formatVersion = conf .getInt (ROCKSDB_FORMAT_VERSION , 5 );
202202
203203 if (lz4CompressionEnabled ) {
204204 options .setCompressionType (CompressionType .LZ4_COMPRESSION );
@@ -235,6 +235,7 @@ private RocksDB initializeRocksDBWithBookieConf(String basePath, String subPath,
235235 } else {
236236 this .cache = null ;
237237 BlockBasedTableConfig tableOptions = new BlockBasedTableConfig ();
238+ tableOptions .setFormatVersion (formatVersion );
238239 tableOptions .setChecksumType (checksumType );
239240 options .setTableFormatConfig (tableOptions );
240241 }
0 commit comments