]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: do not prime pg_temp for creating pgs
authorSage Weil <sage@redhat.com>
Thu, 8 Oct 2015 16:14:49 +0000 (12:14 -0400)
committerSage Weil <sage@redhat.com>
Mon, 23 Nov 2015 13:38:49 +0000 (08:38 -0500)
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 <sage@redhat.com>
src/mon/OSDMonitor.cc

index 5e8e3016ac51aa446976762f9e1f33e92b5d01b0..edc9648056db599236a3aced59316a20cba17f04 100644 (file)
@@ -1024,6 +1024,9 @@ void OSDMonitor::maybe_prime_pg_temp()
 void OSDMonitor::prime_pg_temp(OSDMap& next,
                               ceph::unordered_map<pg_t, pg_stat_t>::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;