From: Sage Weil Date: Fri, 27 Oct 2017 22:37:47 +0000 (-0500) Subject: osd/PG: send release to remote reservations in progress X-Git-Tag: v13.0.1~375^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=81c3e4f868e7b264452a379f27fcfcc0f060b5ae;p=ceph.git osd/PG: send release to remote reservations in progress If we have a REQUEST outstanding and then cancel, send a RELEASE to the REQUEST target too, so that they too can clean up. This avoids leaving the replica in the RepRecovering state when the primary is restarting the whole reservation process. Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index f5fea98dbd9..09dd4b2a218 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -6548,11 +6548,11 @@ void PG::RecoveryState::WaitRemoteBackfillReserved::retry() pg->osd->local_reserver.cancel_reservation(pg->info.pgid); // Send CANCEL to all previously acquired reservations - set::const_iterator it, begin, end, next; + set::const_iterator it, begin, 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) { + for (it = begin; it != backfill_osd_it; ++it) { //The primary never backfills itself assert(*it != pg->pg_whoami); ConnectionRef con = pg->osd->get_con_osd_cluster(