Skip to content

Commit

Permalink
mon: compact full epochs also
Browse files Browse the repository at this point in the history
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: ceph#14537
Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Jan 28, 2016
1 parent 1e08b21 commit 93d633a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mon/PaxosService.cc
Expand Up @@ -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));
}
}

0 comments on commit 93d633a

Please sign in to comment.