summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-04-29 15:05:01 -0700
committerSage Weil <sage@inktank.com>2013-04-29 15:45:58 -0700
commit8f6a1b8fa9499b6c4ad930511e37cc1dcc4ee6bf (patch)
tree831a36eac3771e79c5576eb58b2e5702efc39f53
parent3cb4f6783ba63dd6c931a9fc5cd5feb9c0d4d837 (diff)
downloadceph-8f6a1b8fa9499b6c4ad930511e37cc1dcc4ee6bf.tar.gz
mon/Paxos: compact on trim
Compact the paxos keys when we trim old paxos states. Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/mon/Paxos.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc
index 46eaf88273d..f306a8bf296 100644
--- a/src/mon/Paxos.cc
+++ b/src/mon/Paxos.cc
@@ -974,6 +974,10 @@ void Paxos::trim_to(MonitorDBStore::Transaction *t,
t->erase(get_name(), from);
from++;
}
+ if (g_conf->mon_compact_on_trim) {
+ dout(10) << " compacting prefix" << dendl;
+ t->compact_prefix(get_name());
+ }
}
void Paxos::trim_to(MonitorDBStore::Transaction *t, version_t first)