summaryrefslogtreecommitdiff
path: root/db/db_test.cc
diff options
context:
space:
mode:
authorIslam AbdelRahman <tec@fb.com>2016-10-20 17:05:32 -0700
committerIslam AbdelRahman <tec@fb.com>2016-10-20 17:05:32 -0700
commit869ae5d7868d7d48dd55b7be02a23581101ed69a (patch)
tree44246b7c1c821a3e95528d3ad9c2c1248892c598 /db/db_test.cc
parent1d9dbef64e6101e995035cfcf765255898a6bac5 (diff)
Support IngestExternalFile (remove AddFile restrictions)
Summary: Changes in the diff API changes: - Introduce IngestExternalFile to replace AddFile (I think this make the API more clear) - Introduce IngestExternalFileOptions (This struct will encapsulate the options for ingesting the external file) - Deprecate AddFile() API Logic changes: - If our file overlap with the memtable we will flush the memtable - We will find the first level in the LSM tree that our file key range overlap with the keys in it - We will find the lowest level in the LSM tree above the the level we found in step 2 that our file can fit in and ingest our file in it - We will assign a global sequence number to our new file - Remove AddFile restrictions by using global sequence numbers Other changes: - Refactor all AddFile logic to be encapsulated in ExternalSstFileIngestionJob Test Plan: unit tests (still need to add more) addfile_stress (https://reviews.facebook.net/D65037) Reviewers: yiwu, andrewkr, lightmark, yhchiang, sdong Reviewed By: sdong Subscribers: jkedgar, hcz, andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D65061
Diffstat (limited to 'db/db_test.cc')
-rw-r--r--db/db_test.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/db/db_test.cc b/db/db_test.cc
index 04ec66bb8..a65334de7 100644
--- a/db/db_test.cc
+++ b/db/db_test.cc
@@ -2646,15 +2646,11 @@ class ModelDB : public DB {
}
#ifndef ROCKSDB_LITE
- using DB::AddFile;
- virtual Status AddFile(ColumnFamilyHandle* column_family,
- const std::vector<ExternalSstFileInfo>& file_info_list,
- bool move_file, bool skip_snapshot_check) override {
- return Status::NotSupported("Not implemented.");
- }
- virtual Status AddFile(ColumnFamilyHandle* column_family,
- const std::vector<std::string>& file_path_list,
- bool move_file, bool skip_snapshot_check) override {
+ using DB::IngestExternalFile;
+ virtual Status IngestExternalFile(
+ ColumnFamilyHandle* column_family,
+ const std::vector<std::string>& external_files,
+ const IngestExternalFileOptions& options) override {
return Status::NotSupported("Not implemented.");
}