diff --git a/db/db_impl.cc b/db/db_impl.cc index 3dc761a..54e3038 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -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_); } diff --git a/db/version_set.cc b/db/version_set.cc index 75ad7ef..2484743 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -1088,7 +1088,8 @@ Status VersionSet::WriteSnapshot(log::Writer* log) { const std::vector& 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); } }