]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: trim pgmap less aggressively
authorSage Weil <sage@newdream.net>
Tue, 14 Dec 2010 17:26:12 +0000 (09:26 -0800)
committerSage Weil <sage@newdream.net>
Tue, 14 Dec 2010 19:50:03 +0000 (11:50 -0800)
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 <sage@newdream.net>
src/mon/PGMonitor.cc

index 0e6fc312eb8373d243a893541ceadafb3e4e7bc5..5a4f11131ad7ab3fb66ba95be33da6eb801007e5 100644 (file)
@@ -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();