summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-04-22 15:01:09 -0700
committerSage Weil <sage@inktank.com>2013-04-22 15:12:22 -0700
commitb33fae4ea17f459ca545b37bab3abedaed2cb6b8 (patch)
treea2338f1401535c352662344848631d11b928c07f
parent59d6953ca05ec05dcf5c36d3e4c370169dea4558 (diff)
downloadceph-b33fae4ea17f459ca545b37bab3abedaed2cb6b8.tar.gz
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 <sage@inktank.com>
-rw-r--r--src/mon/LogMonitor.h5
-rw-r--r--src/mon/PaxosService.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mon/LogMonitor.h b/src/mon/LogMonitor.h
index 6f1c4469f26..9eee758d47f 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 b4232ca3667..196a625594c 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
*