pool.info.is_erasure() ? shard_id_t(i) : shard_id_t::NO_SHARD));
}
}
-
// We go incomplete if below min_size for ec_pools since backfill
// does not currently maintain rollbackability
// Otherwise, we will go "peered", but not "active"
if (num_want_acting < pool.info.min_size &&
(pool.info.is_erasure() ||
!cct->_conf->osd_allow_recovery_below_min_size)) {
- dout(10) << __func__ << "failed, below min size" << dendl;
+ dout(10) << __func__ << " failed, below min size" << dendl;
return false;
}
}
}
- dout(20) << __func__ << "candidates by cost are: " << candidates_by_cost
+ dout(20) << __func__ << " candidates by cost are: " << candidates_by_cost
<< dendl;
// take out as many osds as we can for async recovery, in order of cost
async_recovery->insert(cur_shard);
}
}
- dout(20) << __func__ << "result want=" << *want
+ dout(20) << __func__ << " result want=" << *want
<< " async_recovery=" << *async_recovery << dendl;
}
}
}
- dout(20) << __func__ << "candidates by cost are: " << candidates_by_cost
+ dout(20) << __func__ << " candidates by cost are: " << candidates_by_cost
<< dendl;
// take out as many osds as we can for async recovery, in order of cost
for (auto it = candidate_want.begin(); it != candidate_want.end(); ++it) {
if (*it == cur_shard.osd) {
candidate_want.erase(it);
+ want->swap(candidate_want);
async_recovery->insert(cur_shard);
break;
}
break;
}
}
- dout(20) << __func__ << "result want=" << *want
+ dout(20) << __func__ << " result want=" << *want
<< " async_recovery=" << *async_recovery << dendl;
}
choose_async_recovery_replicated(all_info, auth_log_shard->second, &want, &want_async_recovery);
}
}
-
if (want != acting) {
dout(10) << __func__ << " want " << want << " != acting " << acting
<< ", requesting pg_temp change" << dendl;
// Caller is GetInfo
backfill_targets = want_backfill;
}
+ assert(async_recovery_targets.empty() || async_recovery_targets == want_async_recovery);
+ if (async_recovery_targets.empty()) {
+ async_recovery_targets = want_async_recovery;
+ }
// Will not change if already set because up would have had to change
// Verify that nothing in backfill is in stray_set
for (set<pg_shard_t>::iterator i = want_backfill.begin();
++i) {
assert(stray_set.find(*i) == stray_set.end());
}
- dout(10) << __func__ << " want " << want << " (== acting) backfill_targets "
- << want_backfill << dendl;
+ dout(10) << "choose_acting want=" << want << " backfill_targets="
+ << want_backfill << " async_recovery_targets="
+ << async_recovery_targets << dendl;
return true;
}
finish_recovery_op(soid, true);
}
+ async_recovery_targets.clear();
backfill_targets.clear();
backfill_info.clear();
peer_backfill_info.clear();