Remove pin_slice option by making it the default
Summary: This would simplify db_bench_tool.cc Closes https://github.com/facebook/rocksdb/pull/2457 Differential Revision: D5259035 Pulled By: maysamyabandeh fbshipit-source-id: 0a9c3abda624070fe2650200b885ad7e1c60182c
This commit is contained in:
parent
c80c6115de
commit
2c98b06bff
@ -235,8 +235,6 @@ DEFINE_bool(reverse_iterator, false,
|
|||||||
|
|
||||||
DEFINE_bool(use_uint64_comparator, false, "use Uint64 user comparator");
|
DEFINE_bool(use_uint64_comparator, false, "use Uint64 user comparator");
|
||||||
|
|
||||||
DEFINE_bool(pin_slice, true, "use pinnable slice for point lookup");
|
|
||||||
|
|
||||||
DEFINE_int64(batch_size, 1, "Batch size");
|
DEFINE_int64(batch_size, 1, "Batch size");
|
||||||
|
|
||||||
static bool ValidateKeySize(const char* flagname, int32_t value) {
|
static bool ValidateKeySize(const char* flagname, int32_t value) {
|
||||||
@ -3993,7 +3991,6 @@ void VerifyDBFromDB(std::string& truth_db_name) {
|
|||||||
ReadOptions options(FLAGS_verify_checksum, true);
|
ReadOptions options(FLAGS_verify_checksum, true);
|
||||||
std::unique_ptr<const char[]> key_guard;
|
std::unique_ptr<const char[]> key_guard;
|
||||||
Slice key = AllocateKey(&key_guard);
|
Slice key = AllocateKey(&key_guard);
|
||||||
std::string value;
|
|
||||||
PinnableSlice pinnable_val;
|
PinnableSlice pinnable_val;
|
||||||
|
|
||||||
Duration duration(FLAGS_duration, reads_);
|
Duration duration(FLAGS_duration, reads_);
|
||||||
@ -4008,22 +4005,16 @@ void VerifyDBFromDB(std::string& truth_db_name) {
|
|||||||
Status s;
|
Status s;
|
||||||
if (FLAGS_num_column_families > 1) {
|
if (FLAGS_num_column_families > 1) {
|
||||||
s = db_with_cfh->db->Get(options, db_with_cfh->GetCfh(key_rand), key,
|
s = db_with_cfh->db->Get(options, db_with_cfh->GetCfh(key_rand), key,
|
||||||
&value);
|
&pinnable_val);
|
||||||
} else {
|
} else {
|
||||||
if (LIKELY(FLAGS_pin_slice == 1)) {
|
|
||||||
pinnable_val.Reset();
|
pinnable_val.Reset();
|
||||||
s = db_with_cfh->db->Get(options,
|
s = db_with_cfh->db->Get(options,
|
||||||
db_with_cfh->db->DefaultColumnFamily(), key,
|
db_with_cfh->db->DefaultColumnFamily(), key,
|
||||||
&pinnable_val);
|
&pinnable_val);
|
||||||
} else {
|
|
||||||
s = db_with_cfh->db->Get(
|
|
||||||
options, db_with_cfh->db->DefaultColumnFamily(), key, &value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (s.ok()) {
|
if (s.ok()) {
|
||||||
found++;
|
found++;
|
||||||
bytes += key.size() +
|
bytes += key.size() + pinnable_val.size();
|
||||||
(FLAGS_pin_slice == 1 ? pinnable_val.size() : value.size());
|
|
||||||
} else if (!s.IsNotFound()) {
|
} else if (!s.IsNotFound()) {
|
||||||
fprintf(stderr, "Get returned an error: %s\n", s.ToString().c_str());
|
fprintf(stderr, "Get returned an error: %s\n", s.ToString().c_str());
|
||||||
abort();
|
abort();
|
||||||
|
Loading…
Reference in New Issue
Block a user