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

jraft-core里面用了一些rocksdb的Deprecated方法 #982

Open
justforxm opened this issue May 9, 2023 · 2 comments
Open

jraft-core里面用了一些rocksdb的Deprecated方法 #982

justforxm opened this issue May 9, 2023 · 2 comments

Comments

@justforxm
Copy link

将rocksdb升级到最新版本8.1.1.1之后,一些过时的方法已经删掉了,可以去掉吗
com.alipay.sofa.jraft.util.StorageOptionsFactory中的这个方法

**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()) //
        .setWholeKeyFiltering(cfg.wholeKeyFiltering()) //
        .setCacheIndexAndFilterBlocks(cfg.cacheIndexAndFilterBlocks()) //
        .setCacheIndexAndFilterBlocksWithHighPriority(cfg.cacheIndexAndFilterBlocksWithHighPriority()) //
        .setPinL0FilterAndIndexBlocksInCache(cfg.pinL0FilterAndIndexBlocksInCache()) //
        .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());
}**
@fengjiachun
Copy link
Contributor

被 Deprecated 的应该都有替代方法,欢迎提一个 pr

@justforxm
Copy link
Author

好的,我把rocksdb升级到8.1.1.1了,8.1.1.1中去掉了blockCacheCompressed,改成了使用二级缓存,但是二级缓存的方法在javaapi中没有放出来,我直接去掉了setBlockCacheCompressed相关的调用,hashIndexAllowCollision这个参数默认是true,无论设不设置都不变,我也去掉了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants