Parcourir la source

Merge pull request #819 from wzk784533:master

PiperOrigin-RevId: 321000544
naive_version
Victor Costan il y a 4 ans
Parent
révision
c46e79c760
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. +5
    -2
      db/builder.cc

+ 5
- 2
db/builder.cc Voir le fichier

@ -30,11 +30,14 @@ Status BuildTable(const std::string& dbname, Env* env, const Options& options,
TableBuilder* builder = new TableBuilder(options, file); TableBuilder* builder = new TableBuilder(options, file);
meta->smallest.DecodeFrom(iter->key()); meta->smallest.DecodeFrom(iter->key());
Slice key;
for (; iter->Valid(); iter->Next()) { for (; iter->Valid(); iter->Next()) {
Slice key = iter->key();
meta->largest.DecodeFrom(key);
key = iter->key();
builder->Add(key, iter->value()); builder->Add(key, iter->value());
} }
if (!key.empty()) {
meta->largest.DecodeFrom(key);
}
// Finish and check for builder errors // Finish and check for builder errors
s = builder->Finish(); s = builder->Finish();

Chargement…
Annuler
Enregistrer