From: Samuel Just Date: Sun, 3 Nov 2013 19:06:10 +0000 (-0800) Subject: OSD: don't clear peering_wait_for_split in advance_map() X-Git-Tag: v0.67.8~23 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b405bfa49ec31f0c6d8636c4bdde17ee1f81deb7;p=ceph.git OSD: don't clear peering_wait_for_split in advance_map() 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 Reviewed-by: Greg Farnum (cherry picked from commit 9ab513334c7ff9544bac07bd420c6d5d200cf535) --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index fed128b5916..bea378ba6f8 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5405,22 +5405,6 @@ void OSD::advance_map(ObjectStore::Transaction& t, C_Contexts *tfin) waiting_for_pg.erase(p++); } } - map >::iterator q = - peering_wait_for_split.begin(); - while (q != peering_wait_for_split.end()) { - pg_t pgid = q->first; - - // am i still primary? - vector 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()