Flush Buffered Info Logs Before Doing Compaction (one line change)
Summary: Flushing log buffer earlier to avoid confusion of time holding the locks. Test Plan: Should be safe as long as several related db test passes Reviewers: haobo, igor, ljin Reviewed By: igor CC: nkg-, leveldb Differential Revision: https://reviews.facebook.net/D17493
This commit is contained in:
parent
ef7dc38919
commit
99c756f0fe
@ -2945,6 +2945,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact,
|
|||||||
|
|
||||||
// Release mutex while we're actually doing the compaction work
|
// Release mutex while we're actually doing the compaction work
|
||||||
mutex_.Unlock();
|
mutex_.Unlock();
|
||||||
|
log_buffer->FlushBufferToLog();
|
||||||
|
|
||||||
const uint64_t start_micros = env_->NowMicros();
|
const uint64_t start_micros = env_->NowMicros();
|
||||||
unique_ptr<Iterator> input(versions_->MakeInputIterator(compact->compaction));
|
unique_ptr<Iterator> input(versions_->MakeInputIterator(compact->compaction));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user