From: Bill Scales Date: Thu, 4 Dec 2025 13:17:08 +0000 (+0000) Subject: osd: Deleting PG should discard pwlc X-Git-Tag: testing/wip-pdonnell-testing-20260205.015545~28^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d78e0f22b6caee9efe99f2eebc5103a80f2c1e29;p=ceph-ci.git osd: Deleting PG should discard pwlc When a shard of a PG is deleted it clears the PG log and rolls forward any updates that have not been completed, this cleans up the object store removing any objects used for rollback. This step updates pwlc. Normally the next step is that the PG is destoryed, but there is a (very rare) race hazard where a new interval and peering cycle can start which will collect the updated pwlc from this shard. This can disrupt the shards still being used by the PG. Invalidating the pwlc after rolling forward updates fixes this issue. As the PG is being deleted on this shard there is no need to retain pwlc. Fixes: https://tracker.ceph.com/issues/74048 Signed-off-by: Bill Scales --- diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index b6a7ceeec72..ea1fd9dc737 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -7359,7 +7359,8 @@ PeeringState::Deleting::Deleting(my_context ctx) // clear log PGLog::LogEntryHandlerRef rollbacker{pl->get_log_handler(t)}; ps->pg_log.roll_forward(&ps->info, rollbacker.get()); - + // invalidate pwlc + ps->info.partial_writes_last_complete.clear(); // adjust info to backfill ps->info.set_last_backfill(hobject_t()); ps->pg_log.reset_backfill();