@ -948,9 +948,9 @@ Status DBImpl::CompactFilesImpl(
Status status = compaction_job . Install ( * c - > mutable_cf_options ( ) ) ;
Status status = compaction_job . Install ( * c - > mutable_cf_options ( ) ) ;
if ( status . ok ( ) ) {
if ( status . ok ( ) ) {
InstallSuperVersionAndScheduleWork (
InstallSuperVersionAndScheduleWork ( c - > column_family_data ( ) ,
c - > column_family_data ( ) , & job_context - > superversion_contexts [ 0 ] ,
& job_context - > superversion_contexts [ 0 ] ,
* c - > mutable_cf_options ( ) , FlushReason : : kManualCompaction ) ;
* c - > mutable_cf_options ( ) ) ;
}
}
c - > ReleaseCompactionFiles ( s ) ;
c - > ReleaseCompactionFiles ( s ) ;
# ifndef ROCKSDB_LITE
# ifndef ROCKSDB_LITE
@ -1406,9 +1406,8 @@ Status DBImpl::RunManualCompaction(ColumnFamilyData* cfd, int input_level,
ca - > prepicked_compaction = new PrepickedCompaction ;
ca - > prepicked_compaction = new PrepickedCompaction ;
ca - > prepicked_compaction - > manual_compaction_state = & manual ;
ca - > prepicked_compaction - > manual_compaction_state = & manual ;
ca - > prepicked_compaction - > compaction = compaction ;
ca - > prepicked_compaction - > compaction = compaction ;
if ( ! RequestCompactionToken ( cfd , true ,
if ( ! RequestCompactionToken (
& ca - > prepicked_compaction - > task_token ,
cfd , true , & ca - > prepicked_compaction - > task_token , & log_buffer ) ) {
& log_buffer ) ) {
// Don't throttle manual compaction, only count outstanding tasks.
// Don't throttle manual compaction, only count outstanding tasks.
assert ( false ) ;
assert ( false ) ;
}
}
@ -2435,9 +2434,9 @@ Status DBImpl::BackgroundCompaction(bool* made_progress,
status = versions_ - > LogAndApply ( c - > column_family_data ( ) ,
status = versions_ - > LogAndApply ( c - > column_family_data ( ) ,
* c - > mutable_cf_options ( ) , c - > edit ( ) ,
* c - > mutable_cf_options ( ) , c - > edit ( ) ,
& mutex_ , directories_ . GetDbDir ( ) ) ;
& mutex_ , directories_ . GetDbDir ( ) ) ;
InstallSuperVersionAndScheduleWork (
InstallSuperVersionAndScheduleWork ( c - > column_family_data ( ) ,
c - > column_family_data ( ) , & job_context - > superversion_contexts [ 0 ] ,
& job_context - > superversion_contexts [ 0 ] ,
* c - > mutable_cf_options ( ) , FlushReason : : kAutoCompaction ) ;
* c - > mutable_cf_options ( ) ) ;
ROCKS_LOG_BUFFER ( log_buffer , " [%s] Deleted %d files \n " ,
ROCKS_LOG_BUFFER ( log_buffer , " [%s] Deleted %d files \n " ,
c - > column_family_data ( ) - > GetName ( ) . c_str ( ) ,
c - > column_family_data ( ) - > GetName ( ) . c_str ( ) ,
c - > num_input_files ( 0 ) ) ;
c - > num_input_files ( 0 ) ) ;
@ -2489,9 +2488,9 @@ Status DBImpl::BackgroundCompaction(bool* made_progress,
* c - > mutable_cf_options ( ) , c - > edit ( ) ,
* c - > mutable_cf_options ( ) , c - > edit ( ) ,
& mutex_ , directories_ . GetDbDir ( ) ) ;
& mutex_ , directories_ . GetDbDir ( ) ) ;
// Use latest MutableCFOptions
// Use latest MutableCFOptions
InstallSuperVersionAndScheduleWork (
InstallSuperVersionAndScheduleWork ( c - > column_family_data ( ) ,
c - > column_family_data ( ) , & job_context - > superversion_contexts [ 0 ] ,
& job_context - > superversion_contexts [ 0 ] ,
* c - > mutable_cf_options ( ) , FlushReason : : kAutoCompaction ) ;
* c - > mutable_cf_options ( ) ) ;
VersionStorageInfo : : LevelSummaryStorage tmp ;
VersionStorageInfo : : LevelSummaryStorage tmp ;
c - > column_family_data ( ) - > internal_stats ( ) - > IncBytesMoved ( c - > output_level ( ) ,
c - > column_family_data ( ) - > internal_stats ( ) - > IncBytesMoved ( c - > output_level ( ) ,
@ -2575,9 +2574,9 @@ Status DBImpl::BackgroundCompaction(bool* made_progress,
status = compaction_job . Install ( * c - > mutable_cf_options ( ) ) ;
status = compaction_job . Install ( * c - > mutable_cf_options ( ) ) ;
if ( status . ok ( ) ) {
if ( status . ok ( ) ) {
InstallSuperVersionAndScheduleWork (
InstallSuperVersionAndScheduleWork ( c - > column_family_data ( ) ,
c - > column_family_data ( ) , & job_context - > superversion_contexts [ 0 ] ,
& job_context - > superversion_contexts [ 0 ] ,
* c - > mutable_cf_options ( ) , FlushReason : : kAutoCompaction ) ;
* c - > mutable_cf_options ( ) ) ;
}
}
* made_progress = true ;
* made_progress = true ;
TEST_SYNC_POINT_CALLBACK ( " DBImpl::BackgroundCompaction:AfterCompaction " ,
TEST_SYNC_POINT_CALLBACK ( " DBImpl::BackgroundCompaction:AfterCompaction " ,
@ -2815,10 +2814,7 @@ void DBImpl::BuildCompactionJobInfo(
void DBImpl : : InstallSuperVersionAndScheduleWork (
void DBImpl : : InstallSuperVersionAndScheduleWork (
ColumnFamilyData * cfd , SuperVersionContext * sv_context ,
ColumnFamilyData * cfd , SuperVersionContext * sv_context ,
const MutableCFOptions & mutable_cf_options ,
const MutableCFOptions & mutable_cf_options ) {
FlushReason /* flush_reason */ ) {
// TODO(yanqin) investigate if 'flush_reason' can be removed since it's not
// used.
mutex_ . AssertHeld ( ) ;
mutex_ . AssertHeld ( ) ;
// Update max_total_in_memory_state_
// Update max_total_in_memory_state_