]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
log: don't clear ring when dump_recent is called
authorMykola Golub <mgolub@suse.com>
Sun, 21 Oct 2018 07:10:59 +0000 (10:10 +0300)
committerMykola Golub <mgolub@suse.com>
Sun, 21 Oct 2018 07:44:41 +0000 (10:44 +0300)
so the recent entries are still available if dump_recent is called
again. This is the case e.g. when the signal handler wants to dump the
recent entries both to the regular log and to the crash log.

Signed-off-by: Mykola Golub <mgolub@suse.com>
src/log/Log.cc

index 82196645bd4983a481a8fa2f8faa37d232a489e8..302a2e82538730cc83b30c6767033ca33e4cd8e9 100644 (file)
@@ -349,7 +349,7 @@ void Log::dump_recent()
     EntryVector t;
     t.insert(t.end(), std::make_move_iterator(m_recent.begin()), std::make_move_iterator(m_recent.end()));
     m_recent.clear();
-    _flush(t, false, true);
+    _flush(t, true, true);
   }
 
   char buf[4096];