From: Samuel Just Date: Fri, 9 Dec 2016 23:46:33 +0000 (-0800) Subject: PG::GetInfo: remove logic for detecting intervals without complete peers X-Git-Tag: v12.0.3~129^2~40 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e4c7ecea4a51087e2f9cde24c1422b9f6084427f;p=ceph.git PG::GetInfo: remove logic for detecting intervals without complete peers c7d92d1d3fe469f5e8e7c35185a670570c665029 introduced this back when the acting set could contain incomplete peers during backfill. That hasn't been true since dumpling. Now, any interval where the acting set contains an incomplete peer cannot possibly go active. Thus, it can't change last_epoch_started or history.last_epoch_started. Thus, even though choose_acting omits incomplete peers, the answer can't change. Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 49bd4863475..b423168a059 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -7546,62 +7546,7 @@ boost::statechart::result PG::RecoveryState::GetInfo::react(const MNotifyRec& in pg->apply_peer_features(infoevt.features); // are we done getting everything? - if (peer_info_requested.empty() && !prior_set->pg_down) { - /* - * make sure we have at least one !incomplete() osd from the - * last rw interval. the incomplete (backfilling) replicas - * get a copy of the log, but they don't get all the object - * updates, so they are insufficient to recover changes during - * that interval. - */ - if (pg->info.history.last_epoch_started) { - for (map::reverse_iterator p = pg->past_intervals.rbegin(); - p != pg->past_intervals.rend(); - ++p) { - if (p->first < pg->info.history.last_epoch_started) - break; - if (!p->second.maybe_went_rw) - continue; - pg_interval_t& interval = p->second; - ldout(pg->cct, 10) << " last maybe_went_rw interval was " << interval << dendl; - OSDMapRef osdmap = pg->get_osdmap(); - - /* - * this mirrors the PriorSet calculation: we wait if we - * don't have an up (AND !incomplete) node AND there are - * nodes down that might be usable. - */ - bool any_up_complete_now = false; - bool any_down_now = false; - for (unsigned i=0; ipool.info.ec_pool() ? shard_id_t(i) : shard_id_t::NO_SHARD); - if (!osdmap->exists(o) || osdmap->get_info(o).lost_at > interval.first) - continue; // dne or lost - if (osdmap->is_up(o)) { - pg_info_t *pinfo; - if (so == pg->pg_whoami) { - pinfo = &pg->info; - } else { - assert(pg->peer_info.count(so)); - pinfo = &pg->peer_info[so]; - } - if (!pinfo->is_incomplete()) - any_up_complete_now = true; - } else { - any_down_now = true; - } - } - if (!any_up_complete_now && any_down_now) { - ldout(pg->cct, 10) << " no osds up+complete from interval " << interval << dendl; - post_event(IsDown()); - return discard_event(); - } - break; - } - } + if (peer_info_requested.empty() && !prior_set.pg_down) { ldout(pg->cct, 20) << "Common peer features: " << hex << pg->get_min_peer_features() << dec << dendl; ldout(pg->cct, 20) << "Common acting features: " << hex << pg->get_min_acting_features() << dec << dendl; ldout(pg->cct, 20) << "Common upacting features: " << hex << pg->get_min_upacting_features() << dec << dendl;