diff --git a/db/version_builder.cc b/db/version_builder.cc index 955c42c0d..d0ea16f0a 100644 --- a/db/version_builder.cc +++ b/db/version_builder.cc @@ -507,16 +507,7 @@ VersionBuilder::VersionBuilder(const FileOptions& file_options, Logger* info_log) : rep_(new Rep(file_options, info_log, table_cache, base_vstorage)) {} -VersionBuilder::~VersionBuilder() { delete rep_; } - -Status VersionBuilder::CheckConsistency(VersionStorageInfo* vstorage) { - return rep_->CheckConsistency(vstorage); -} - -Status VersionBuilder::CheckConsistencyForDeletes(VersionEdit* edit, - uint64_t number, int level) { - return rep_->CheckConsistencyForDeletes(edit, number, level); -} +VersionBuilder::~VersionBuilder() = default; bool VersionBuilder::CheckConsistencyForNumLevels() { return rep_->CheckConsistencyForNumLevels(); @@ -537,9 +528,4 @@ Status VersionBuilder::LoadTableHandlers( is_initial_load, prefix_extractor); } -void VersionBuilder::MaybeAddFile(VersionStorageInfo* vstorage, int level, - FileMetaData* f) { - rep_->MaybeAddFile(vstorage, level, f); -} - } // namespace ROCKSDB_NAMESPACE diff --git a/db/version_builder.h b/db/version_builder.h index 87415ed55..a2c8e0294 100644 --- a/db/version_builder.h +++ b/db/version_builder.h @@ -8,6 +8,9 @@ // found in the LICENSE file. See the AUTHORS file for names of contributors. // #pragma once + +#include + #include "rocksdb/file_system.h" #include "rocksdb/slice_transform.h" @@ -27,9 +30,7 @@ class VersionBuilder { VersionBuilder(const FileOptions& file_options, TableCache* table_cache, VersionStorageInfo* base_vstorage, Logger* info_log = nullptr); ~VersionBuilder(); - Status CheckConsistency(VersionStorageInfo* vstorage); - Status CheckConsistencyForDeletes(VersionEdit* edit, uint64_t number, - int level); + bool CheckConsistencyForNumLevels(); Status Apply(VersionEdit* edit); Status SaveTo(VersionStorageInfo* vstorage); @@ -37,11 +38,10 @@ class VersionBuilder { bool prefetch_index_and_filter_in_cache, bool is_initial_load, const SliceTransform* prefix_extractor); - void MaybeAddFile(VersionStorageInfo* vstorage, int level, FileMetaData* f); private: class Rep; - Rep* rep_; + std::unique_ptr rep_; }; extern bool NewestFirstBySeqNo(FileMetaData* a, FileMetaData* b);