Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove deprecated method to adapt higher rocksdb version #1058

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading