]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Paxos: compact on trim
authorSage Weil <sage@inktank.com>
Mon, 29 Apr 2013 22:05:01 +0000 (15:05 -0700)
committerSage Weil <sage@inktank.com>
Mon, 29 Apr 2013 22:45:58 +0000 (15:45 -0700)
Compact the paxos keys when we trim old paxos states.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/Paxos.cc

index 46eaf88273d694254d31e68da7a4cd137f686c2b..f306a8bf296f3d1f743a357f34ba945aa3b27482 100644 (file)
@@ -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)