From: Kefu Chai Date: Sun, 17 May 2026 10:06:04 +0000 (+0800) Subject: crimson/osd: complete PGAdvanceMap's pg-deleted path properly X-Git-Tag: v21.0.1~165^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cc0dc343a483eabf4a244369dd79409fdc4f663c;p=ceph.git crimson/osd: complete PGAdvanceMap's pg-deleted path properly When the pg has been deleted while PGAdvanceMap was queued, start() takes an early return and skips the map-advance loop. The PeeringCtx handed to the operation may already carry a transaction and queued peering messages, so returning without calling complete_rctx() would drop them. Dispatch the rctx before bailing out. Also leave the PGPeeringPipeline::process stage via handle.complete() instead of relying on the exit_handle defer's handle.exit(). The pg-deleted path is a graceful completion, not an op failure, so it should match the normal completion path; handle.exit() is documented for the failure case only. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/osd_operations/pg_advance_map.cc b/src/crimson/osd/osd_operations/pg_advance_map.cc index d22e42926d85..0c58cecee74d 100644 --- a/src/crimson/osd/osd_operations/pg_advance_map.cc +++ b/src/crimson/osd/osd_operations/pg_advance_map.cc @@ -71,6 +71,9 @@ seastar::future<> PGAdvanceMap::start() // pg may have been deleted while this op was queued; see PG::do_delete_work. if (pg->is_deleted()) { DEBUG("{}: pg is deleted, skipping advance", *this); + co_await pg->complete_rctx(std::move(rctx)); + co_await handle.complete(); + exit_handle.cancel(); co_return; }