@ -806,22 +806,24 @@ class DB {
// "column_family", a vector of ExternalSstFileInfo can be used
// instead of "file_path_list" to do a blind batch add that wont
// need to read the file, move_file can be set to true to
// move the files instead of copying them.
// move the files instead of copying them, skip_snapshot_check can be set to
// true to ignore the snapshot, make sure that you know that when you use it,
// snapshots see the data that is added in the new files.
//
// Current Requirements:
// (1) The key ranges of the files don't overlap with each other
// (2) The key range of any file in list doesn't overlap with
// existing keys or tombstones in DB.
// (3) No snapshots are held.
// (3) No snapshots are held (check skip_snapshot_check to skip this check) .
//
// Notes: We will try to ingest the files to the lowest possible level
// even if the file compression dont match the level compression
virtual Status AddFile ( ColumnFamilyHandle * column_family ,
const std : : vector < std : : string > & file_path_list ,
bool move_file = false ) = 0 ;
bool move_file = false , bool skip_snapshot_check = false ) = 0 ;
virtual Status AddFile ( const std : : vector < std : : string > & file_path_list ,
bool move_file = false ) {
return AddFile ( DefaultColumnFamily ( ) , file_path_list , move_file ) ;
bool move_file = false , bool skip_snapshot_check = false ) {
return AddFile ( DefaultColumnFamily ( ) , file_path_list , move_file , skip_snapshot_check ) ;
}
# if defined(__GNUC__) || defined(__clang__)
__attribute__ ( ( __deprecated__ ) )
@ -830,9 +832,9 @@ class DB {
# endif
virtual Status
AddFile ( ColumnFamilyHandle * column_family , const std : : string & file_path ,
bool move_file = false ) {
bool move_file = false , bool skip_snapshot_check = false ) {
return AddFile ( column_family , std : : vector < std : : string > ( 1 , file_path ) ,
move_file ) ;
move_file , skip_snapshot_check ) ;
}
# if defined(__GNUC__) || defined(__clang__)
__attribute__ ( ( __deprecated__ ) )
@ -840,18 +842,18 @@ class DB {
__declspec ( deprecated )
# endif
virtual Status
AddFile ( const std : : string & file_path , bool move_file = false ) {
AddFile ( const std : : string & file_path , bool move_file = false , bool skip_snapshot_check = false ) {
return AddFile ( DefaultColumnFamily ( ) ,
std : : vector < std : : string > ( 1 , file_path ) , move_file ) ;
std : : vector < std : : string > ( 1 , file_path ) , move_file , skip_snapshot_check ) ;
}
// Load table file with information "file_info" into "column_family"
virtual Status AddFile ( ColumnFamilyHandle * column_family ,
const std : : vector < ExternalSstFileInfo > & file_info_list ,
bool move_file = false ) = 0 ;
bool move_file = false , bool skip_snapshot_check = false ) = 0 ;
virtual Status AddFile ( const std : : vector < ExternalSstFileInfo > & file_info_list ,
bool move_file = false ) {
return AddFile ( DefaultColumnFamily ( ) , file_info_list , move_file ) ;
bool move_file = false , bool skip_snapshot_check = false ) {
return AddFile ( DefaultColumnFamily ( ) , file_info_list , move_file , skip_snapshot_check ) ;
}
# if defined(__GNUC__) || defined(__clang__)
__attribute__ ( ( __deprecated__ ) )
@ -860,9 +862,9 @@ class DB {
# endif
virtual Status
AddFile ( ColumnFamilyHandle * column_family ,
const ExternalSstFileInfo * file_info , bool move_file = false ) {
const ExternalSstFileInfo * file_info , bool move_file = false , bool skip_snapshot_check = false ) {
return AddFile ( column_family ,
std : : vector < ExternalSstFileInfo > ( 1 , * file_info ) , move_file ) ;
std : : vector < ExternalSstFileInfo > ( 1 , * file_info ) , move_file , skip_snapshot_check ) ;
}
# if defined(__GNUC__) || defined(__clang__)
__attribute__ ( ( __deprecated__ ) )
@ -870,9 +872,9 @@ class DB {
__declspec ( deprecated )
# endif
virtual Status
AddFile ( const ExternalSstFileInfo * file_info , bool move_file = false ) {
AddFile ( const ExternalSstFileInfo * file_info , bool move_file = false , bool skip_snapshot_check = false ) {
return AddFile ( DefaultColumnFamily ( ) ,
std : : vector < ExternalSstFileInfo > ( 1 , * file_info ) , move_file ) ;
std : : vector < ExternalSstFileInfo > ( 1 , * file_info ) , move_file , skip_snapshot_check ) ;
}
# endif // ROCKSDB_LITE