Skip to content

Commit

Permalink
fix by comments
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Dec 18, 2019
1 parent e701976 commit ea96ead
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rdsn
2 changes: 1 addition & 1 deletion src/server/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
rocksdb_block_cache_num_shard_bits = -1
rocksdb_disable_bloom_filter = false
# Bloom filter type, should be either 'common' or 'prefix'
rocksdb_filter_type = common
rocksdb_filter_type = prefix

checkpoint_reserve_min_count = 2
checkpoint_reserve_time_seconds = 1800
Expand Down
6 changes: 3 additions & 3 deletions src/server/pegasus_server_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ pegasus_server_impl::pegasus_server_impl(dsn::replication::replica *r)
std::string filter_type =
dsn_config_get_value_string("pegasus.server",
"rocksdb_filter_type",
"common",
"prefix",
"Bloom filter type, should be either 'common' or 'prefix'");
dassert(filter_type == "common" || filter_type == "prefix",
"[pegasus.server]rocksdb_filter_type should be either 'common' or 'prefix'.");
Expand Down Expand Up @@ -723,7 +723,7 @@ void pegasus_server_impl::on_multi_get(const ::dsn::apps::multi_get_request &req
return;
}

std::unique_ptr<rocksdb::Iterator> it = nullptr;
std::unique_ptr<rocksdb::Iterator> it;
bool complete = false;
if (!request.reverse) {
it.reset(_db->NewIterator(_rd_opts));
Expand Down Expand Up @@ -779,7 +779,7 @@ void pegasus_server_impl::on_multi_get(const ::dsn::apps::multi_get_request &req
} else { // reverse
rocksdb::ReadOptions rd_opts(_rd_opts);
if (_db_opts.prefix_extractor) {
// TODO(yingchun): Prefix bloom filter is not supported in reverse seek mode (see
// NOTE: Prefix bloom filter is not supported in reverse seek mode (see
// https://github.com/facebook/rocksdb/wiki/Prefix-Seek-API-Changes#limitation for
// more details), and we have to do total order seek on rocksdb which might be worse
// performance. However we consider that reverse scan is a rare use case, and if
Expand Down

0 comments on commit ea96ead

Please sign in to comment.