Kaynağa Gözat

修改元数据相关bug

lzj_version
林子骥 2 hafta önce
ebeveyn
işleme
40ee2672a9
2 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  1. +3
    -1
      db/db_impl.cc
  2. +2
    -1
      db/version_set.cc

+ 3
- 1
db/db_impl.cc Dosyayı Görüntüle

@ -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 Dosyayı Görüntüle

@ -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);
}
}

Yükleniyor…
İptal
Kaydet