@ -178,10 +178,9 @@ class DBImpl : public DB {
virtual bool GetAggregatedIntProperty ( const Slice & property ,
uint64_t * aggregated_value ) override ;
using DB : : GetApproximateSizes ;
virtual void GetApproximateSizes ( ColumnFamilyHandle * column_family ,
const Range * range , int n , uint64_t * sizes ,
uint8_t include_flags
= INCLUDE_FILES ) override ;
virtual void GetApproximateSizes (
ColumnFamilyHandle * column_family , const Range * range , int n ,
uint64_t * sizes , uint8_t include_flags = INCLUDE_FILES ) override ;
using DB : : GetApproximateMemTableStats ;
virtual void GetApproximateMemTableStats ( ColumnFamilyHandle * column_family ,
const Range & range ,
@ -284,9 +283,8 @@ class DBImpl : public DB {
// Status::NotFound() will be returned if the current DB does not have
// any column family match the specified name.
// TODO(yhchiang): output parameter is placed in the end in this codebase.
virtual void GetColumnFamilyMetaData (
ColumnFamilyHandle * column_family ,
ColumnFamilyMetaData * metadata ) override ;
virtual void GetColumnFamilyMetaData ( ColumnFamilyHandle * column_family ,
ColumnFamilyMetaData * metadata ) override ;
Status SuggestCompactRange ( ColumnFamilyHandle * column_family ,
const Slice * begin , const Slice * end ) override ;
@ -378,9 +376,8 @@ class DBImpl : public DB {
Status RunManualCompaction ( ColumnFamilyData * cfd , int input_level ,
int output_level , uint32_t output_path_id ,
uint32_t max_subcompactions ,
const Slice * begin , const Slice * end ,
bool exclusive ,
uint32_t max_subcompactions , const Slice * begin ,
const Slice * end , bool exclusive ,
bool disallow_trivial_move = false ) ;
// Return an internal iterator over the current state of the database.
@ -427,8 +424,8 @@ class DBImpl : public DB {
// Return the maximum overlapping data (in bytes) at next level for any
// file at a level >= 1.
int64_t TEST_MaxNextLevelOverlappingBytes ( ColumnFamilyHandle * column_family =
nullptr ) ;
int64_t TEST_MaxNextLevelOverlappingBytes (
ColumnFamilyHandle * column_family = nullptr ) ;
// Return the current manifest file no.
uint64_t TEST_Current_Manifest_FileNo ( ) ;
@ -801,13 +798,12 @@ class DBImpl : public DB {
const MutableCFOptions & mutable_cf_options ,
int job_id , TableProperties prop ) ;
void NotifyOnCompactionBegin ( ColumnFamilyData * cfd ,
Compaction * c , const Status & st ,
const CompactionJobStats & job_stats ,
int job_id ) ;
void NotifyOnCompactionBegin ( ColumnFamilyData * cfd , Compaction * c ,
const Status & st ,
const CompactionJobStats & job_stats , int job_id ) ;
void NotifyOnCompactionCompleted ( ColumnFamilyData * cfd ,
Compaction * c , const Status & st ,
void NotifyOnCompactionCompleted ( ColumnFamilyData * cfd , Compaction * c ,
const Status & st ,
const CompactionJobStats & job_stats ,
int job_id ) ;
void NotifyOnMemTableSealed ( ColumnFamilyData * cfd ,
@ -1197,7 +1193,8 @@ class DBImpl : public DB {
// Return the minimum empty level that could hold the total data in the
// input level. Return the input level, if such level could not be found.
int FindMinimumEmptyLevelFitting ( ColumnFamilyData * cfd ,
const MutableCFOptions & mutable_cf_options , int level ) ;
const MutableCFOptions & mutable_cf_options ,
int level ) ;
// Move the files in the input level to the target level.
// If target_level < 0, automatically calculate the minimum level that could
@ -1274,8 +1271,7 @@ class DBImpl : public DB {
std : : unique_ptr < ColumnFamilyMemTablesImpl > column_family_memtables_ ;
struct LogFileNumberSize {
explicit LogFileNumberSize ( uint64_t _number )
: number ( _number ) { }
explicit LogFileNumberSize ( uint64_t _number ) : number ( _number ) { }
void AddSize ( uint64_t new_size ) { size + = new_size ; }
uint64_t number ;
uint64_t size = 0 ;
@ -1487,15 +1483,15 @@ class DBImpl : public DB {
uint32_t output_path_id ;
Status status ;
bool done ;
bool in_progress ; // compaction request being processed?
bool incomplete ; // only part of requested range compacted
bool exclusive ; // current behavior of only one manual
bool disallow_trivial_move ; // Force actual compaction to run
const InternalKey * begin ; // nullptr means beginning of key range
const InternalKey * end ; // nullptr means end of key range
InternalKey * manual_end ; // how far we are compacting
InternalKey tmp_storage ; // Used to keep track of compaction progress
InternalKey tmp_storage1 ; // Used to keep track of compaction progress
bool in_progress ; // compaction request being processed?
bool incomplete ; // only part of requested range compacted
bool exclusive ; // current behavior of only one manual
bool disallow_trivial_move ; // Force actual compaction to run
const InternalKey * begin ; // nullptr means beginning of key range
const InternalKey * end ; // nullptr means end of key range
InternalKey * manual_end ; // how far we are compacting
InternalKey tmp_storage ; // Used to keep track of compaction progress
InternalKey tmp_storage1 ; // Used to keep track of compaction progress
} ;
struct PrepickedCompaction {
// background compaction takes ownership of `compaction`.
@ -1619,9 +1615,9 @@ class DBImpl : public DB {
# ifndef ROCKSDB_LITE
using DB : : GetPropertiesOfAllTables ;
virtual Status GetPropertiesOfAllTables ( ColumnFamilyHandle * column_family ,
TablePropertiesCollection * props )
override ;
virtual Status GetPropertiesOfAllTables (
ColumnFamilyHandle * column_family ,
TablePropertiesCollection * props ) override ;
virtual Status GetPropertiesOfTablesInRange (
ColumnFamilyHandle * column_family , const Range * range , std : : size_t n ,
TablePropertiesCollection * props ) override ;
@ -1659,9 +1655,7 @@ class DBImpl : public DB {
void MarkAsGrabbedForPurge ( uint64_t file_number ) ;
size_t GetWalPreallocateBlockSize ( uint64_t write_buffer_size ) const ;
Env : : WriteLifeTimeHint CalculateWALWriteHint ( ) {
return Env : : WLTH_SHORT ;
}
Env : : WriteLifeTimeHint CalculateWALWriteHint ( ) { return Env : : WLTH_SHORT ; }
// When set, we use a separate queue for writes that dont write to memtable.
// In 2PC these are the writes at Prepare phase.
@ -1723,8 +1717,7 @@ class DBImpl : public DB {
InstrumentedCondVar atomic_flush_install_cv_ ;
} ;
extern Options SanitizeOptions ( const std : : string & db ,
const Options & src ) ;
extern Options SanitizeOptions ( const std : : string & db , const Options & src ) ;
extern DBOptions SanitizeOptions ( const std : : string & db , const DBOptions & src ) ;