Merge pull request #16262 from liewegas/wip-20208

mgr/ClusterState: do not mangle PGMap outside of Incremental
This commit is contained in:
Gregory Farnum 2017-07-13 09:37:42 -07:00 committed by GitHub
commit 24d4415a96

View File

@ -98,10 +98,12 @@ void ClusterState::ingest_pgstats(MPGStats *stats)
}
// In case we already heard about more recent stats from this PG
// from another OSD
if (pg_map.pg_stat[pgid].get_version_pair() > pg_stats.get_version_pair()) {
const auto q = pg_map.pg_stat.find(pgid);
if (q != pg_map.pg_stat.end() &&
q->second.get_version_pair() > pg_stats.get_version_pair()) {
dout(15) << " had " << pgid << " from "
<< pg_map.pg_stat[pgid].reported_epoch << ":"
<< pg_map.pg_stat[pgid].reported_seq << dendl;
<< q->second.reported_epoch << ":"
<< q->second.reported_seq << dendl;
continue;
}