From: songbaisen Date: Wed, 15 Jun 2016 09:30:10 +0000 (+0800) Subject: mon: do not recalculate 'to_remove' when it's known X-Git-Tag: ses5-milestone5~455^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0f7bd0246be8fc20b8c25b71979c66c8dfd7cc2b;p=ceph.git mon: do not recalculate 'to_remove' when it's known Signed-off-by:song baisen --- diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc index 0ab108694217..8b0b2d1baef5 100644 --- a/src/mon/PaxosService.cc +++ b/src/mon/PaxosService.cc @@ -328,7 +328,7 @@ void PaxosService::maybe_trim() << " > paxos_service_trim_max, limiting to " << g_conf->paxos_service_trim_max << dendl; trim_to = get_first_committed() + g_conf->paxos_service_trim_max; - to_remove = trim_to - get_first_committed(); + to_remove = g_conf->paxos_service_trim_max; } dout(10) << __func__ << " trimming to " << trim_to << ", " << to_remove << " states" << dendl;