@ -1923,13 +1923,13 @@ void DBImpl::BackgroundCallFlush() {
if ( madeProgress ) {
if ( madeProgress ) {
MaybeScheduleFlushOrCompaction ( ) ;
MaybeScheduleFlushOrCompaction ( ) ;
}
}
log_buffer . FlushBufferToLog ( ) ;
bg_cv_ . SignalAll ( ) ;
bg_cv_ . SignalAll ( ) ;
// IMPORTANT: there should be no code after calling SignalAll. This call may
// IMPORTANT: there should be no code after calling SignalAll. This call may
// signal the DB destructor that it's OK to proceed with destruction. In
// signal the DB destructor that it's OK to proceed with destruction. In
// that case, all DB variables will be dealloacated and referencing them
// that case, all DB variables will be dealloacated and referencing them
// will cause trouble.
// will cause trouble.
}
}
log_buffer . FlushBufferToLog ( ) ;
}
}
@ -1996,13 +1996,13 @@ void DBImpl::BackgroundCallCompaction() {
if ( madeProgress ) {
if ( madeProgress ) {
MaybeScheduleFlushOrCompaction ( ) ;
MaybeScheduleFlushOrCompaction ( ) ;
}
}
log_buffer . FlushBufferToLog ( ) ;
bg_cv_ . SignalAll ( ) ;
bg_cv_ . SignalAll ( ) ;
// IMPORTANT: there should be no code after calling SignalAll. This call may
// IMPORTANT: there should be no code after calling SignalAll. This call may
// signal the DB destructor that it's OK to proceed with destruction. In
// signal the DB destructor that it's OK to proceed with destruction. In
// that case, all DB variables will be dealloacated and referencing them
// that case, all DB variables will be dealloacated and referencing them
// will cause trouble.
// will cause trouble.
}
}
log_buffer . FlushBufferToLog ( ) ;
}
}
Status DBImpl : : BackgroundCompaction ( bool * madeProgress ,
Status DBImpl : : BackgroundCompaction ( bool * madeProgress ,