]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: commit LogSummary on every message 234/head
authorSage Weil <sage@inktank.com>
Mon, 22 Apr 2013 22:01:09 +0000 (15:01 -0700)
committerSage Weil <sage@inktank.com>
Mon, 22 Apr 2013 22:12:22 +0000 (15:12 -0700)
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>
src/mon/LogMonitor.h
src/mon/PaxosService.h

index 6f1c4469f2647c7695d899f3b0446eea34259e92..9eee758d47f20a098530aae2a6bfe6f24b74b78d 100644 (file)
@@ -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;
index b4232ca36671472877922dd545d5d7fa4fe05a0c..196a625594c8f4a7b7561504f90aa4c5a761037f 100644 (file)
@@ -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
    *