From: sdong Date: Fri, 4 Apr 2014 17:28:58 +0000 (-0700) Subject: Flush Buffered Info Logs Before Doing Compaction (one line change) X-Git-Tag: v2.8~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=99c756f0fed119a1980d8d90765b3209dc925a0d;p=rocksdb.git 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 --- diff --git a/db/db_impl.cc b/db/db_impl.cc index 0f1d227c..28cf4854 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -2945,6 +2945,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact, // Release mutex while we're actually doing the compaction work mutex_.Unlock(); + log_buffer->FlushBufferToLog(); const uint64_t start_micros = env_->NowMicros(); unique_ptr input(versions_->MakeInputIterator(compact->compaction));