From: Sage Weil Date: Tue, 14 Dec 2010 17:26:12 +0000 (-0800) Subject: mon: trim pgmap less aggressively X-Git-Tag: v0.24~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=89d5c91e7d207d646651f8959ee37a15ea199d1b;p=ceph.git mon: trim pgmap less aggressively This will make observer crashes due to missed states (#648) much harder to hit. Eventually the pgmap state trim problem will go away when the monitor/paxos code is restructured (#647). Signed-off-by: Sage Weil --- diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 0e6fc312eb83..5a4f11131ad7 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -134,9 +134,10 @@ bool PGMonitor::update_from_paxos() mon->store->put_bl_sn(d, "pgmap_dump", paxosv); } + unsigned max = 500; if (mon->is_leader() && - paxosv > 10) - paxos->trim_to(paxosv - 10); + paxosv > max) + paxos->trim_to(paxosv - max); send_pg_creates();