summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-07-29 18:16:57 +0200
committerSage Weil <sage@newdream.net>2010-07-29 18:17:03 +0200
commit6db897560714d23e12ccb795f55c44c8ee85e402 (patch)
treefc0476b4cd3bcec9d0b76ce78d3ef82c925eb9f2
parentdebian: ceph-cfuse: move ceph from Recommends to Suggests (diff)
downloadceph-6db897560714d23e12ccb795f55c44c8ee85e402.tar.xz
ceph-6db897560714d23e12ccb795f55c44c8ee85e402.zip
mon: trim old logm states
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r--src/mon/LogMonitor.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc
index be2982b1ebc..eeef24b100f 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;
}