Just because we have prior_set.empty() doesn't mean that the prior set
wasn't built. Create a flag to represent this concept.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
prior_set_down.clear();
prior_set_up_thru.clear();
prior_set_lost.clear();
+ prior_set_built = false;
}
<< (is_down() ? " down":"")
<< (some_down ? " some_down":"")
<< dendl;
+ prior_set_built = true;
}
void PG::clear_primary_state()
if (!is_active())
state_set(PG_STATE_PEERING);
- if (prior_set.empty())
+ if (!prior_set_built)
build_prior();
dout(10) << "peer prior_set is " << prior_set << dendl;
// [primary only] content recovery state
bool have_master_log;
protected:
+ bool prior_set_built;
set<int> prior_set; // current+prior OSDs, as defined by info.history.last_epoch_started.
set<int> prior_set_down; // down osds normally exluded from prior_set
map<int,epoch_t> prior_set_up_thru; // osds whose up_thru we care about
set<int> prior_set_lost; // osds in the prior set which are lost
+
bool need_up_thru;
set<int> stray_set; // non-acting osds that have PG data.
set<int> uptodate_set; // current OSDs that are uptodate
role(0),
state(0),
have_master_log(true),
+ prior_set_built(false),
need_up_thru(false),
pg_stats_lock("PG::pg_stats_lock"),
pg_stats_valid(false),