Browse Source

fix bug and update benchmark

version_2_1
小人鱼 9 months ago
parent
commit
6bf30eea97
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      benchmarks/db_bench.cc
  2. +1
    -1
      db/db_impl.cc

+ 1
- 1
benchmarks/db_bench.cc View File

@ -74,7 +74,7 @@ static int FLAGS_reads = -1;
static int FLAGS_threads = 1;
// Size of each value
static int FLAGS_value_size = 100;
static int FLAGS_value_size = 5000;
// Arrange to generate values that shrink to this fraction of
// their original size after compression

+ 1
- 1
db/db_impl.cc View File

@ -1234,7 +1234,7 @@ Status DBImpl::Get(const ReadOptions& options, const Slice& key,
mem->Unref();
if (imm != nullptr) imm->Unref();
current->Unref();
if(!s.ok())return s;
if(value->c_str()[0]==0x00){
*value=value->substr(1);
return s;

Loading…
Cancel
Save