From 0f7bd0246be8fc20b8c25b71979c66c8dfd7cc2b Mon Sep 17 00:00:00 2001 From: songbaisen Date: Wed, 15 Jun 2016 17:30:10 +0800 Subject: [PATCH] mon: do not recalculate 'to_remove' when it's known Signed-off-by:song baisen --- src/mon/PaxosService.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3