Skip to content

Commit

Permalink
Merge pull request #819 from wzk784533:master
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 321000544
  • Loading branch information
pwnall committed Jul 13, 2020
2 parents 5bd5f0f + 28602d3 commit c46e79c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions db/builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ Status BuildTable(const std::string& dbname, Env* env, const Options& options,

TableBuilder* builder = new TableBuilder(options, file);
meta->smallest.DecodeFrom(iter->key());
Slice key;
for (; iter->Valid(); iter->Next()) {
Slice key = iter->key();
meta->largest.DecodeFrom(key);
key = iter->key();
builder->Add(key, iter->value());
}
if (!key.empty()) {
meta->largest.DecodeFrom(key);
}

// Finish and check for builder errors
s = builder->Finish();
Expand Down

0 comments on commit c46e79c

Please sign in to comment.