@ -238,12 +238,12 @@ void CompactionJob::ReportStartedCompaction(
// In the current design, a CompactionJob is always created
// In the current design, a CompactionJob is always created
// for non-trivial compaction.
// for non-trivial compaction.
assert ( compaction - > IsTrivialMove ( ) = = false | |
assert ( compaction - > IsTrivialMove ( ) = = false | |
compaction - > IsManualC ompaction( ) = = true ) ;
compaction - > is_manual_c ompaction( ) = = true ) ;
ThreadStatusUtil : : SetThreadOperationProperty (
ThreadStatusUtil : : SetThreadOperationProperty (
ThreadStatus : : COMPACTION_PROP_FLAGS ,
ThreadStatus : : COMPACTION_PROP_FLAGS ,
compaction - > IsManualC ompaction( ) +
compaction - > is_manual_c ompaction( ) +
( compaction - > IsDeletionC ompaction( ) < < 1 ) ) ;
( compaction - > deletion_c ompaction( ) < < 1 ) ) ;
ThreadStatusUtil : : SetThreadOperationProperty (
ThreadStatusUtil : : SetThreadOperationProperty (
ThreadStatus : : COMPACTION_TOTAL_INPUT_BYTES ,
ThreadStatus : : COMPACTION_TOTAL_INPUT_BYTES ,
@ -263,7 +263,7 @@ void CompactionJob::ReportStartedCompaction(
if ( compaction_job_stats_ ) {
if ( compaction_job_stats_ ) {
compaction_job_stats_ - > is_manual_compaction =
compaction_job_stats_ - > is_manual_compaction =
compaction - > IsManualC ompaction( ) ;
compaction - > is_manual_c ompaction( ) ;
}
}
}
}
@ -298,7 +298,7 @@ void CompactionJob::Prepare() {
}
}
// Is this compaction producing files at the bottommost level?
// Is this compaction producing files at the bottommost level?
bottommost_level_ = compact_ - > compaction - > BottomMostL evel( ) ;
bottommost_level_ = compact_ - > compaction - > bottommost_l evel( ) ;
}
}
Status CompactionJob : : Run ( ) {
Status CompactionJob : : Run ( ) {
@ -864,7 +864,7 @@ Status CompactionJob::ProcessKeyValueCompaction(int64_t* imm_micros,
// Close output file if it is big enough
// Close output file if it is big enough
if ( compact_ - > builder - > FileSize ( ) > =
if ( compact_ - > builder - > FileSize ( ) > =
compact_ - > compaction - > MaxOutputFileS ize( ) ) {
compact_ - > compaction - > max_output_file_s ize( ) ) {
status = FinishCompactionOutputFile ( input ) ;
status = FinishCompactionOutputFile ( input ) ;
if ( ! status . ok ( ) ) {
if ( ! status . ok ( ) ) {
break ;
break ;
@ -1160,7 +1160,7 @@ Status CompactionJob::OpenCompactionOutputFile() {
uint64_t file_number = versions_ - > NewFileNumber ( ) ;
uint64_t file_number = versions_ - > NewFileNumber ( ) ;
// Make the output file
// Make the output file
std : : string fname = TableFileName ( db_options_ . db_paths , file_number ,
std : : string fname = TableFileName ( db_options_ . db_paths , file_number ,
compact_ - > compaction - > GetOutputPathI d( ) ) ;
compact_ - > compaction - > output_path_i d( ) ) ;
Status s = env_ - > NewWritableFile ( fname , & compact_ - > outfile , env_options_ ) ;
Status s = env_ - > NewWritableFile ( fname , & compact_ - > outfile , env_options_ ) ;
if ( ! s . ok ( ) ) {
if ( ! s . ok ( ) ) {
@ -1174,7 +1174,7 @@ Status CompactionJob::OpenCompactionOutputFile() {
}
}
CompactionState : : Output out ;
CompactionState : : Output out ;
out . number = file_number ;
out . number = file_number ;
out . path_id = compact_ - > compaction - > GetOutputPathI d( ) ;
out . path_id = compact_ - > compaction - > output_path_i d( ) ;
out . smallest . Clear ( ) ;
out . smallest . Clear ( ) ;
out . largest . Clear ( ) ;
out . largest . Clear ( ) ;
out . smallest_seqno = out . largest_seqno = 0 ;
out . smallest_seqno = out . largest_seqno = 0 ;
@ -1198,7 +1198,7 @@ Status CompactionJob::OpenCompactionOutputFile() {
compact_ - > builder . reset ( NewTableBuilder (
compact_ - > builder . reset ( NewTableBuilder (
* cfd - > ioptions ( ) , cfd - > internal_comparator ( ) ,
* cfd - > ioptions ( ) , cfd - > internal_comparator ( ) ,
cfd - > int_tbl_prop_collector_factories ( ) , compact_ - > outfile . get ( ) ,
cfd - > int_tbl_prop_collector_factories ( ) , compact_ - > outfile . get ( ) ,
compact_ - > compaction - > OutputCompressionType ( ) ,
compact_ - > compaction - > output_compression ( ) ,
cfd - > ioptions ( ) - > compression_opts , skip_filters ) ) ;
cfd - > ioptions ( ) - > compression_opts , skip_filters ) ) ;
LogFlush ( db_options_ . info_log ) ;
LogFlush ( db_options_ . info_log ) ;
return s ;
return s ;