<< " but DNE in pg_map; pool was probably deleted."
<< dendl;
continue;
- }
-
- // In case we already heard about more recent stats from this PG
- // from another OSD
- if (pg_map.pg_stat.count(pgid) &&
- pg_map.pg_stat[pgid].get_version_pair() > pg_stats.get_version_pair()) {
+ // In case we already heard about more recent stats from this PG
+ // from another OSD
+ } else if (pg_map.pg_stat[pgid].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;
continue;
dout(20) << " removing creating_pg " << p
<< " because it is localized and obsolete" << dendl;
pending_inc->pg_remove.insert(p);
- removed++;
- }
- if (!osd_map.have_pg_pool(p.pool())) {
+ ++removed;
+ } else if (!osd_map.have_pg_pool(p.pool())) {
dout(20) << " removing creating_pg " << p
<< " because containing pool deleted" << dendl;
pending_inc->pg_remove.insert(p);
<< "containing pool deleted" << dendl;
pending_inc->pg_remove.insert(p.first);
++removed;
- }
- if (p.first.preferred() >= 0) {
+ } else if (p.first.preferred() >= 0) {
dout(20) << " removing localized pg " << p.first << dendl;
pending_inc->pg_remove.insert(p.first);
++removed;