From: Sage Weil Date: Fri, 1 Dec 2017 22:15:24 +0000 (-0600) Subject: osd/PG: break out of Active AdvMap handler if interval change X-Git-Tag: wip-pdonnell-testing-20180317.202121~887^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f04729cedee9c2c53dd56b952b6b2167ae392da1;p=ceph-ci.git osd/PG: break out of Active AdvMap handler if interval change If we are about to lose our primary status, we don't want to do *any* of this stuff... especially share_pg_info(), which would get tagged with the current epoch but confuse our peers! Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index d3e6a215755..cbaa90e12c7 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -7274,6 +7274,16 @@ PG::RecoveryState::Active::Active(my_context ctx) boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap) { PG *pg = context< RecoveryMachine >().pg; + if (pg->should_restart_peering( + advmap.up_primary, + advmap.acting_primary, + advmap.newup, + advmap.newacting, + advmap.lastmap, + advmap.osdmap)) { + ldout(pg->cct, 10) << "Active advmap interval change, fast return" << dendl; + return forward_event(); + } ldout(pg->cct, 10) << "Active advmap" << dendl; if (!pg->pool.newly_removed_snaps.empty()) { pg->snap_trimq.union_of(pg->pool.newly_removed_snaps);