Skip to content

Commit

Permalink
chore: remove deprecated method to adapt higher rocksdb version
Browse files Browse the repository at this point in the history
  • Loading branch information
leizhiyuan committed Dec 22, 2023
1 parent 1e9590e commit 6ad1bbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,6 @@ public static DBOptions getDefaultRocksDBOptions() {
// We make it 1G as default.
opts.setMaxTotalWalSize(1 << 30);

// The maximum number of concurrent background compactions. The default is 1,
// but to fully utilize your CPU and storage you might want to increase this
// to approximately number of cores in the system.
opts.setMaxBackgroundCompactions(Math.min(Utils.cpus(), 4));

// The maximum number of concurrent flush operations. It is usually good enough
// to set this to 1.
opts.setMaxBackgroundFlushes(1);

return opts;
}

Expand Down Expand Up @@ -374,16 +365,12 @@ public static BlockBasedTableConfig getDefaultRocksDBTableConfig() {
.setCacheIndexAndFilterBlocksWithHighPriority(true) //
.setPinL0FilterAndIndexBlocksInCache(true) //
// End of partitioned index filters settings.
.setBlockSize(4 * SizeUnit.KB)//
.setBlockCacheSize(512 * SizeUnit.MB) //
.setCacheNumShardBits(8);
.setBlockSize(4 * SizeUnit.KB);
}

private static BlockBasedTableConfig copyTableFormatConfig(final BlockBasedTableConfig cfg) {
return new BlockBasedTableConfig() //
.setNoBlockCache(cfg.noBlockCache()) //
.setBlockCacheSize(cfg.blockCacheSize()) //
.setCacheNumShardBits(cfg.cacheNumShardBits()) //
.setBlockSize(cfg.blockSize()) //
.setBlockSizeDeviation(cfg.blockSizeDeviation()) //
.setBlockRestartInterval(cfg.blockRestartInterval()) //
Expand All @@ -394,9 +381,6 @@ private static BlockBasedTableConfig copyTableFormatConfig(final BlockBasedTable
.setPartitionFilters(cfg.partitionFilters()) //
.setMetadataBlockSize(cfg.metadataBlockSize()) //
.setPinTopLevelIndexAndFilter(cfg.pinTopLevelIndexAndFilter()) //
.setHashIndexAllowCollision(cfg.hashIndexAllowCollision()) //
.setBlockCacheCompressedSize(cfg.blockCacheCompressedSize()) //
.setBlockCacheCompressedNumShardBits(cfg.blockCacheCompressedNumShardBits()) //
.setChecksumType(cfg.checksumType()) //
.setIndexType(cfg.indexType()) //
.setFormatVersion(cfg.formatVersion());
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<project.encoding>UTF-8</project.encoding>
<protobuf.version>3.5.1</protobuf.version>
<protostuff.version>1.6.0</protostuff.version>
<rocksdb.version>7.10.2</rocksdb.version>
<rocksdb.version>8.8.1</rocksdb.version>
<slf4j.version>1.7.21</slf4j.version>
</properties>

Expand Down

0 comments on commit 6ad1bbb

Please sign in to comment.