const std::set<pg_shard_t> &get_acting_recovery_backfill() const {
return recovery_state.get_acting_recovery_backfill();
}
+ const shard_id_set &get_acting_recovery_backfill_shard_id_set() const {
+ return recovery_state.get_acting_recovery_backfill_shard_id_set();
+ }
bool is_acting(pg_shard_t osd) const {
return recovery_state.is_acting(osd);
}
peer_purged.clear();
acting_recovery_backfill.clear();
+ acting_recovery_backfill_shard_id_set.clear();
// reset primary/replica state?
if (was_old_primary || is_primary()) {
{
async_recovery_targets.clear();
backfill_targets.clear();
+ backfill_target_shard_id_set.clear();
}
void PeeringState::clear_primary_state()
return true;
want_acting.clear();
acting_recovery_backfill = want_acting_backfill;
+ acting_recovery_backfill_shard_id_set.clear();
+ for (auto &ps : acting_recovery_backfill) {
+ if (ps.shard != shard_id_t::NO_SHARD) {
+ acting_recovery_backfill_shard_id_set.insert(ps.shard);
+ }
+ }
psdout(10) << "acting_recovery_backfill is "
<< acting_recovery_backfill << dendl;
ceph_assert(
if (backfill_targets.empty()) {
// Caller is GetInfo
backfill_targets = want_backfill;
+ backfill_target_shard_id_set.clear();
+ for (auto &&i : want_backfill) {
+ if (i.shard != shard_id_t::NO_SHARD) {
+ backfill_target_shard_id_set.insert(i.shard);
+ }
+ }
}
// Adding !needs_recovery() to let the async_recovery_targets reset after recovery is complete
ceph_assert(
/// union of acting, recovery, and backfill targets
std::set<pg_shard_t> acting_recovery_backfill;
+ shard_id_set acting_recovery_backfill_shard_id_set;
std::vector<HeartbeatStampsRef> hb_stamps;
std::set<pg_shard_t> peer_activated;
std::set<pg_shard_t> backfill_targets; ///< osds to be backfilled
+ shard_id_set backfill_target_shard_id_set;
std::set<pg_shard_t> async_recovery_targets; ///< osds to be async recovered
/// osds which might have objects on them which are unfound on the primary
const std::set<pg_shard_t> &get_backfill_targets() const {
return backfill_targets;
}
+ const shard_id_set &get_backfill_target_shard_id_set() const
+ {
+ return backfill_target_shard_id_set;
+ }
bool is_async_recovery_target(pg_shard_t peer) const {
return async_recovery_targets.count(peer);
}
const std::set<pg_shard_t> &get_acting_recovery_backfill() const {
return acting_recovery_backfill;
}
+ const shard_id_set &get_acting_recovery_backfill_shard_id_set() const {
+ return acting_recovery_backfill_shard_id_set;
+ }
const PGLog &get_pg_log() const {
return pg_log;