From b33fae4ea17f459ca545b37bab3abedaed2cb6b8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 22 Apr 2013 15:01:09 -0700 Subject: [PATCH] mon: commit LogSummary on every message This moves our version pointer up so that we don't re-log (by re-consuming) log messages to /var/log/ceph/ceph.log on ceph-mon restart. OTOH, it means we rewrite the summary of the last 50 messages, but we consider that to be relatively cheap (and something we *always* did prior for bobtail and earlier anyway). Signed-off-by: Sage Weil --- src/mon/LogMonitor.h | 5 +++++ src/mon/PaxosService.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mon/LogMonitor.h b/src/mon/LogMonitor.h index 6f1c4469f264..9eee758d47f2 100644 --- a/src/mon/LogMonitor.h +++ b/src/mon/LogMonitor.h @@ -49,6 +49,11 @@ private: bool should_propose(double& delay); + bool should_stash_full() { + // commit a LogSummary on every commit + return true; + } + struct C_Log : public Context { LogMonitor *logmon; MLog *ack; diff --git a/src/mon/PaxosService.h b/src/mon/PaxosService.h index b4232ca36671..196a625594c8 100644 --- a/src/mon/PaxosService.h +++ b/src/mon/PaxosService.h @@ -663,7 +663,7 @@ public: * @defgroup PaxosService_h_Stash_Full * @{ */ - bool should_stash_full(); + virtual bool should_stash_full(); /** * Encode a full version on @p t * -- 2.47.3