]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: don't clear peering_wait_for_split in advance_map()
authorSamuel Just <sam.just@inktank.com>
Sun, 3 Nov 2013 19:06:10 +0000 (11:06 -0800)
committerSamuel Just <sam.just@inktank.com>
Mon, 4 Nov 2013 19:08:25 +0000 (11:08 -0800)
I really don't know why I added this...  Ops can be discarded from the
waiting_for_pg queue if we aren't primary simply because there must have
been an exchange of peering events before subops will be sent within a
particular epoch.  Thus, any events in the waiting_for_pg queue must be
client ops which should only be seen by the primary.  Peering events, on
the other hand, should only be discarded if we are in a new interval,
and that check might as well be performed in the peering wq.

Fixes: #6681
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/osd/OSD.cc

index eb5191f770e15ab047d06421d80854cd732aa3ef..0a2d057df169aa5600cd6bfc63d821c4da4a0caf 100644 (file)
@@ -5441,22 +5441,6 @@ void OSD::advance_map(ObjectStore::Transaction& t, C_Contexts *tfin)
       waiting_for_pg.erase(p++);
     }
   }
-  map<pg_t, list<PG::CephPeeringEvtRef> >::iterator q =
-    peering_wait_for_split.begin();
-  while (q != peering_wait_for_split.end()) {
-    pg_t pgid = q->first;
-
-    // am i still primary?
-    vector<int> acting;
-    int nrep = osdmap->pg_to_acting_osds(pgid, acting);
-    int role = osdmap->calc_pg_role(whoami, acting, nrep);
-    if (role >= 0) {
-      ++q;  // still me
-    } else {
-      dout(10) << " discarding waiting ops for " << pgid << dendl;
-      peering_wait_for_split.erase(q++);
-    }
-  }
 }
 
 void OSD::consume_map()