From: Sage Weil Date: Mon, 22 Apr 2013 22:01:09 +0000 (-0700) Subject: mon: commit LogSummary on every message X-Git-Tag: v0.61~122^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b33fae4ea17f459ca545b37bab3abedaed2cb6b8;p=ceph.git 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 --- 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 *