]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: compact full epochs also 7396/head
authorKefu Chai <kchai@redhat.com>
Thu, 28 Jan 2016 10:09:53 +0000 (02:09 -0800)
committerKefu Chai <kchai@redhat.com>
Thu, 28 Jan 2016 10:53:19 +0000 (18:53 +0800)
by compacting the ${prefix}.${start}..${prefix}..${end} does not
necessary compact the range of ${prefix}."full_"${start}..
${prefix}."full_"${end}. so when more and more epochs get trimmed
with out a full range compaction, the size of monitor store could
be very large.

Fixes: #14537
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/PaxosService.cc

index 141a28be9e3b47a5330933d36676c37987e3525f..ab169b8b9c39ba43834eafa849ff7c224f307081 100644 (file)
@@ -388,6 +388,9 @@ void PaxosService::trim(MonitorDBStore::TransactionRef t,
   if (g_conf->mon_compact_on_trim) {
     dout(20) << " compacting prefix " << get_service_name() << dendl;
     t->compact_range(get_service_name(), stringify(from - 1), stringify(to));
+    t->compact_range(get_service_name(),
+                    mon->store->combine_strings(full_prefix_name, from - 1),
+                    mon->store->combine_strings(full_prefix_name, to));
   }
 }