Sfoglia il codice sorgente

修改元数据相关bug

lzj_version
林子骥 3 settimane fa
parent
commit
40ee2672a9
2 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. +3
    -1
      db/db_impl.cc
  2. +2
    -1
      db/version_set.cc

+ 3
- 1
db/db_impl.cc Vedi File

@ -902,8 +902,10 @@ Status DBImpl::InstallCompactionResults(CompactionState* compact) {
const int level = compact->compaction->level();
for (size_t i = 0; i < compact->outputs.size(); i++) {
const CompactionState::Output& out = compact->outputs[i];
// compact->compaction->edit()->AddFile(level + 1, out.number, out.file_size,
// out.smallest, out.largest);
compact->compaction->edit()->AddFile(level + 1, out.number, out.file_size,
out.smallest, out.largest);
out.smallest, out.largest,out.old_ts,out.new_ts);
}
return versions_->LogAndApply(compact->compaction->edit(), &mutex_);
}

+ 2
- 1
db/version_set.cc Vedi File

@ -1088,7 +1088,8 @@ Status VersionSet::WriteSnapshot(log::Writer* log) {
const std::vector<FileMetaData*>& files = current_->files_[level];
for (size_t i = 0; i < files.size(); i++) {
const FileMetaData* f = files[i];
edit.AddFile(level, f->number, f->file_size, f->smallest, f->largest);
//edit.AddFile(level, f->number, f->file_size, f->smallest, f->largest);
edit.AddFile(level, f->number, f->file_size, f->smallest, f->largest,f->oldest_ts,f->newer_ts);
}
}

Caricamento…
Annulla
Salva