PG::RecoveryState::WaitRemoteBackfillReserved::WaitRemoteBackfillReserved(my_context ctx)
: my_base(ctx),
NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/WaitRemoteBackfillReserved"),
- backfill_osd_it(context< Active >().sorted_backfill_set.begin())
+ backfill_osd_it(context< Active >().remote_shards_to_reserve_backfill.begin())
{
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
{
PG *pg = context< RecoveryMachine >().pg;
- if (backfill_osd_it != context< Active >().sorted_backfill_set.end()) {
+ if (backfill_osd_it != context< Active >().remote_shards_to_reserve_backfill.end()) {
//The primary never backfills itself
assert(*backfill_osd_it != pg->pg_whoami);
ConnectionRef con = pg->osd->get_con_osd_cluster(
// Send REJECT to all previously acquired reservations
set<pg_shard_t>::const_iterator it, begin, end, next;
- begin = context< Active >().sorted_backfill_set.begin();
- end = context< Active >().sorted_backfill_set.end();
+ begin = context< Active >().remote_shards_to_reserve_backfill.begin();
+ end = context< Active >().remote_shards_to_reserve_backfill.end();
assert(begin != end);
for (next = it = begin, ++next ; next != backfill_osd_it; ++it, ++next) {
//The primary never backfills itself
PG::RecoveryState::WaitRemoteRecoveryReserved::WaitRemoteRecoveryReserved(my_context ctx)
: my_base(ctx),
NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/WaitRemoteRecoveryReserved"),
- acting_osd_it(context< Active >().sorted_actingbackfill_set.begin())
+ remote_recovery_reservation_it(context< Active >().remote_shards_to_reserve_recovery.begin())
{
context< RecoveryMachine >().log_enter(state_name);
post_event(RemoteRecoveryReserved());
PG::RecoveryState::WaitRemoteRecoveryReserved::react(const RemoteRecoveryReserved &evt) {
PG *pg = context< RecoveryMachine >().pg;
- if (acting_osd_it != context< Active >().sorted_actingbackfill_set.end()) {
+ if (remote_recovery_reservation_it != context< Active >().remote_shards_to_reserve_recovery.end()) {
// skip myself
- if (*acting_osd_it == pg->pg_whoami)
- ++acting_osd_it;
+ if (*remote_recovery_reservation_it == pg->pg_whoami)
+ ++remote_recovery_reservation_it;
}
- if (acting_osd_it != context< Active >().sorted_actingbackfill_set.end()) {
+ if (remote_recovery_reservation_it != context< Active >().remote_shards_to_reserve_recovery.end()) {
ConnectionRef con = pg->osd->get_con_osd_cluster(
- acting_osd_it->osd, pg->get_osdmap()->get_epoch());
+ remote_recovery_reservation_it->osd, pg->get_osdmap()->get_epoch());
if (con) {
if (con->has_feature(CEPH_FEATURE_RECOVERY_RESERVATION)) {
pg->osd->send_message_osd_cluster(
new MRecoveryReserve(
MRecoveryReserve::REQUEST,
- spg_t(pg->info.pgid.pgid, acting_osd_it->shard),
+ spg_t(pg->info.pgid.pgid, remote_recovery_reservation_it->shard),
pg->get_osdmap()->get_epoch()),
con.get());
} else {
post_event(RemoteRecoveryReserved());
}
}
- ++acting_osd_it;
+ ++remote_recovery_reservation_it;
} else {
post_event(AllRemotesReserved());
}
// release remote reservations
for (set<pg_shard_t>::const_iterator i =
- context< Active >().sorted_actingbackfill_set.begin();
- i != context< Active >().sorted_actingbackfill_set.end();
+ context< Active >().remote_shards_to_reserve_recovery.begin();
+ i != context< Active >().remote_shards_to_reserve_recovery.end();
++i) {
if (*i == pg->pg_whoami) // skip myself
continue;
PG::RecoveryState::Active::Active(my_context ctx)
: my_base(ctx),
NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active"),
- sorted_actingbackfill_set(
+ remote_shards_to_reserve_recovery(
context< RecoveryMachine >().pg->actingbackfill.begin(),
context< RecoveryMachine >().pg->actingbackfill.end()),
- sorted_backfill_set(
+ remote_shards_to_reserve_backfill(
context< RecoveryMachine >().pg->backfill_targets.begin(),
context< RecoveryMachine >().pg->backfill_targets.end()),
all_replicas_activated(false)