// see if i have ever started since joining the pg. this is important only
// if we want to exclude lost osds.
+ // FIXME: this check is broken. it is probably better than nothing (which would allow
+ // us to go active with an empty PG), but it needs a closer look!
set<int> started_since_joining;
for (vector<int>::const_iterator q = acting.begin(); q != acting.end(); q++) {
int o = *q;
break; // we don't care
if (!interval.maybe_went_rw)
continue;
- if (std::find(interval.acting.begin(), interval.acting.end(), o)
- != interval.acting.end())
+ if (std::find(interval.acting.begin(), interval.acting.end(), o) != interval.acting.end())
started_since_joining.insert(o);
break;
}
}
-
- dout(10) << "build_prior " << started_since_joining << " have started since joining this pg" << dendl;
+ dout(10) << "build_prior osds <" << started_since_joining
+ << "> have started since joining this pg" << dendl;
for (map<epoch_t,Interval>::const_reverse_iterator p = past_intervals.rbegin();
p != past_intervals.rend();
// consider UP osds
for (unsigned i=0; i<interval.up.size(); i++) {
int o = interval.up[i];
-
if (osdmap.is_up(o)) // is up now
cur.insert(o);
}
bool have_master_log;
protected:
bool prior_set_built;
+
struct PgPriorSet {
set<int> cur; // current+prior OSDs, as defined by info.history.last_epoch_started.
set<int> down; // down osds normally exluded from cur
set<int> lost; // osds in the prior set which are lost
map<int,epoch_t> up_thru; // osds whose up_thru we care about
vector<Interval> inter_up_thru; // intervals whose up_thru we care about
- bool crashed;
+ bool crashed; /// true if past osd failures were such that clients may need to replay requests.
bool pg_down;
bool some_down;
const PG *pg;