From: Xiubo Li Date: Sun, 3 Nov 2019 07:20:15 +0000 (+0530) Subject: log: there is no need to flush the log buf X-Git-Tag: v15.1.0~777^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F31243%2Fhead;p=ceph.git log: there is no need to flush the log buf The m_log_buf just a buffer for the log messages in _flush() before flushing them to the log files and the buffer should already be emptied by the _flush() routine. It makes no sense to flush the empty buffer again here. Signed-off-by: Xiubo Li --- diff --git a/src/log/Log.cc b/src/log/Log.cc index 10cc60bda1ac..6a1f40f51dac 100644 --- a/src/log/Log.cc +++ b/src/log/Log.cc @@ -345,7 +345,6 @@ void Log::dump_recent() } _flush(m_flush, false); - _flush_logbuf(); _log_message("--- begin dump of recent events ---", true); { @@ -375,7 +374,7 @@ void Log::dump_recent() _log_message("--- end dump of recent events ---", true); - _flush_logbuf(); + assert(m_log_buf.empty()); m_flush_mutex_holder = 0; }