From: Sage Weil Date: Tue, 12 Dec 2017 19:26:28 +0000 (-0600) Subject: osd/PG: drop dup call to publish_stats_to_osd in Active AdvMap handler X-Git-Tag: v13.0.2~510^2~17 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0874dca54bf5bc1fe0e92a46051b54da0447263;p=ceph.git osd/PG: drop dup call to publish_stats_to_osd in Active AdvMap handler Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 76660d242831..39beef8caf5d 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -7386,6 +7386,7 @@ boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap) return forward_event(); } ldout(pg->cct, 10) << "Active advmap" << dendl; + bool need_publish = false; if (advmap.osdmap->require_osd_release >= CEPH_RELEASE_MIMIC) { const auto& new_removed_snaps = advmap.osdmap->get_new_removed_snaps(); @@ -7464,7 +7465,7 @@ boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap) // share updated purged_snaps to mgr/mon so that we (a) stop reporting // purged snaps and (b) perhaps share more snaps that we have purged // but didn't fit in pg_stat_t. - pg->publish_stats_to_osd(); + need_publish = true; pg->share_pg_info(); } } else if (!pg->pool.newly_removed_snaps.empty()) { @@ -7482,7 +7483,6 @@ boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap) } } - bool need_publish = false; /* Check for changes in pool size (if the acting set changed as a result, * this does not matter) */ if (advmap.lastmap->get_pg_size(pg->info.pgid.pgid) !=