From: Sage Weil Date: Thu, 8 Oct 2015 16:14:49 +0000 (-0400) Subject: mon/OSDMonitor: do not prime pg_temp for creating pgs X-Git-Tag: v10.0.1~26^2~23 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b3b0a95e43a0cca255c8cb6ed0ca1125b05d7c60;p=ceph.git mon/OSDMonitor: do not prime pg_temp for creating pgs It will be less work for the old primary to ignore the create message and the new one to query it and find nothing that for the slightly more complicated peering and removal process to happen. Also, this reduces bloat in the OSDMap a bit. Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 5e8e3016ac51..edc9648056db 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1024,6 +1024,9 @@ void OSDMonitor::maybe_prime_pg_temp() void OSDMonitor::prime_pg_temp(OSDMap& next, ceph::unordered_map::iterator pp) { + // do not prime creating pgs + if (pp->second.state & PG_STATE_CREATING) + return; // do not touch a mapping if a change is pending if (pending_inc.new_pg_temp.count(pp->first)) return;