Skip to content

Commit

Permalink
update rocksdb version (sofastack#674)
Browse files Browse the repository at this point in the history
Co-authored-by: 邱家榆 <[email protected]>
  • Loading branch information
qiujiayu and 邱家榆 authored Sep 7, 2021
1 parent b32f1ef commit 8fa1a5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public static BlockBasedTableConfig getDefaultRocksDBTableConfig() {
// Begin to use partitioned index filters
// https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters#how-to-use-it
.setIndexType(IndexType.kTwoLevelIndexSearch) //
.setFilter(new BloomFilter(16, false)) //
.setFilterPolicy(new BloomFilter((double) 16, false)) //
.setPartitionFilters(true) //
.setMetadataBlockSize(8 * SizeUnit.KB) //
.setCacheIndexAndFilterBlocks(false) //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.rocksdb.DBOptions;
import org.rocksdb.Env;
import org.rocksdb.EnvOptions;
import org.rocksdb.Holder;
import org.rocksdb.IngestExternalFileOptions;
import org.rocksdb.Options;
import org.rocksdb.ReadOptions;
Expand Down Expand Up @@ -289,8 +290,9 @@ public void containsKey(final byte[] key, final KVStoreClosure closure) {
readLock.lock();
try {
boolean exists = false;
if (this.db.keyMayExist(key, new StringBuilder(0))) {
exists = this.db.get(key) != null;
Holder<byte[]> valueHolder = new Holder<>();
if (this.db.keyMayExist(key, valueHolder)) {
exists = valueHolder.getValue() != null;
}
setSuccess(closure, exists);
} catch (final Exception e) {
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>5.18.4</rocksdb.version>
<rocksdb.version>6.22.1.1</rocksdb.version>
<slf4j.version>1.7.21</slf4j.version>
</properties>

Expand Down

0 comments on commit 8fa1a5b

Please sign in to comment.