From 8822562d7577a408f078386e30fd1b15adbf6edf Mon Sep 17 00:00:00 2001 From: Akanksha Mahajan Date: Tue, 25 Jan 2022 22:29:33 -0800 Subject: [PATCH] Remove deprecated function DB::AddFile (#9433) Summary: RocksDB has marked DB::AddFile() as "DEPRECATED_FUNC" for a long time, and it will be removed in the upcoming 7.0 release. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9433 Test Plan: make check -j64; CircleCI Reviewed By: riversand963 Differential Revision: D33763987 Pulled By: akankshamahajan15 fbshipit-source-id: a3407324479bb43689e1213e4e29d53095e7579a --- HISTORY.md | 1 + include/rocksdb/db.h | 102 ------------------------------------------- 2 files changed, 1 insertion(+), 102 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 3c96689c1..8e64fb3ee 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,7 @@ ### Public API changes * Remove HDFS support from main repo. * Remove librados support from main repo. +* Remove deprecated API DB::AddFile from main repo. ## 6.29.0 (01/21/2022) Note: The next release will be major release 7.0. See https://github.com/facebook/rocksdb/issues/9390 for more info. diff --git a/include/rocksdb/db.h b/include/rocksdb/db.h index c6cb973d9..30da287e1 100644 --- a/include/rocksdb/db.h +++ b/include/rocksdb/db.h @@ -1569,108 +1569,6 @@ class DB { virtual Status VerifyChecksum() { return VerifyChecksum(ReadOptions()); } - // AddFile() is deprecated, please use IngestExternalFile() - ROCKSDB_DEPRECATED_FUNC virtual Status AddFile( - ColumnFamilyHandle* column_family, - const std::vector& file_path_list, bool move_file = false, - bool skip_snapshot_check = false) { - IngestExternalFileOptions ifo; - ifo.move_files = move_file; - ifo.snapshot_consistency = !skip_snapshot_check; - ifo.allow_global_seqno = false; - ifo.allow_blocking_flush = false; - return IngestExternalFile(column_family, file_path_list, ifo); - } - - ROCKSDB_DEPRECATED_FUNC virtual Status AddFile( - const std::vector& file_path_list, bool move_file = false, - bool skip_snapshot_check = false) { - IngestExternalFileOptions ifo; - ifo.move_files = move_file; - ifo.snapshot_consistency = !skip_snapshot_check; - ifo.allow_global_seqno = false; - ifo.allow_blocking_flush = false; - return IngestExternalFile(DefaultColumnFamily(), file_path_list, ifo); - } - - // AddFile() is deprecated, please use IngestExternalFile() - ROCKSDB_DEPRECATED_FUNC virtual Status AddFile( - ColumnFamilyHandle* column_family, const std::string& file_path, - bool move_file = false, bool skip_snapshot_check = false) { - IngestExternalFileOptions ifo; - ifo.move_files = move_file; - ifo.snapshot_consistency = !skip_snapshot_check; - ifo.allow_global_seqno = false; - ifo.allow_blocking_flush = false; - return IngestExternalFile(column_family, {file_path}, ifo); - } - - ROCKSDB_DEPRECATED_FUNC virtual Status AddFile( - const std::string& file_path, bool move_file = false, - bool skip_snapshot_check = false) { - IngestExternalFileOptions ifo; - ifo.move_files = move_file; - ifo.snapshot_consistency = !skip_snapshot_check; - ifo.allow_global_seqno = false; - ifo.allow_blocking_flush = false; - return IngestExternalFile(DefaultColumnFamily(), {file_path}, ifo); - } - - // Load table file with information "file_info" into "column_family" - ROCKSDB_DEPRECATED_FUNC virtual Status AddFile( - ColumnFamilyHandle* column_family, - const std::vector& file_info_list, - bool move_file = false, bool skip_snapshot_check = false) { - std::vector external_files; - for (const ExternalSstFileInfo& file_info : file_info_list) { - external_files.push_back(file_info.file_path); - } - IngestExternalFileOptions ifo; - ifo.move_files = move_file; - ifo.snapshot_consistency = !skip_snapshot_check; - ifo.allow_global_seqno = false; - ifo.allow_blocking_flush = false; - return IngestExternalFile(column_family, external_files, ifo); - } - - ROCKSDB_DEPRECATED_FUNC virtual Status AddFile( - const std::vector& file_info_list, - bool move_file = false, bool skip_snapshot_check = false) { - std::vector external_files; - for (const ExternalSstFileInfo& file_info : file_info_list) { - external_files.push_back(file_info.file_path); - } - IngestExternalFileOptions ifo; - ifo.move_files = move_file; - ifo.snapshot_consistency = !skip_snapshot_check; - ifo.allow_global_seqno = false; - ifo.allow_blocking_flush = false; - return IngestExternalFile(DefaultColumnFamily(), external_files, ifo); - } - - ROCKSDB_DEPRECATED_FUNC virtual Status AddFile( - ColumnFamilyHandle* column_family, const ExternalSstFileInfo* file_info, - bool move_file = false, bool skip_snapshot_check = false) { - IngestExternalFileOptions ifo; - ifo.move_files = move_file; - ifo.snapshot_consistency = !skip_snapshot_check; - ifo.allow_global_seqno = false; - ifo.allow_blocking_flush = false; - return IngestExternalFile(column_family, {file_info->file_path}, ifo); - } - - ROCKSDB_DEPRECATED_FUNC virtual Status AddFile( - const ExternalSstFileInfo* file_info, bool move_file = false, - bool skip_snapshot_check = false) { - IngestExternalFileOptions ifo; - ifo.move_files = move_file; - ifo.snapshot_consistency = !skip_snapshot_check; - ifo.allow_global_seqno = false; - ifo.allow_blocking_flush = false; - return IngestExternalFile(DefaultColumnFamily(), {file_info->file_path}, - ifo); - } - #endif // ROCKSDB_LITE // Returns the unique ID which is read from IDENTITY file during the opening