]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: do not recalculate 'to_remove' when it's known 9717/head
authorsongbaisen <song.baisen@zte.com.cn>
Wed, 15 Jun 2016 09:30:10 +0000 (17:30 +0800)
committersongbaisen <song.baisen@zte.com.cn>
Mon, 20 Jun 2016 00:48:17 +0000 (08:48 +0800)
Signed-off-by:song baisen <song.baisen@zte.com.cn>

src/mon/PaxosService.cc

index 0ab108694217113c79c4fd6dae2ecd39fe4af6c6..8b0b2d1baef54f1176cad290c76e2bb9edbe3aaa 100644 (file)
@@ -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;