From: Sage Weil Date: Thu, 29 Jul 2010 16:16:57 +0000 (-0700) Subject: mon: trim old logm states X-Git-Tag: v0.21~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6db897560714d23e12ccb795f55c44c8ee85e402;p=ceph.git mon: trim old logm states Signed-off-by: Sage Weil --- diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc index be2982b1ebcc..eeef24b100fc 100644 --- a/src/mon/LogMonitor.cc +++ b/src/mon/LogMonitor.cc @@ -168,6 +168,12 @@ bool LogMonitor::update_from_paxos() if (blogerr.length()) mon->store->append_bl_ss(blogerr, "log.err", NULL); + + // trim + int max = 500; + if (mon->is_leader() && paxosv > max) + paxos->trim_to(paxosv - max); + return true; }