]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Deleting PG should discard pwlc 68709/head
authorBill Scales <bill_scales@uk.ibm.com>
Thu, 4 Dec 2025 13:17:08 +0000 (13:17 +0000)
committerBill Scales <bill_scales@uk.ibm.com>
Fri, 1 May 2026 07:52:32 +0000 (08:52 +0100)
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 <bill_scales@uk.ibm.com>
(cherry picked from commit d78e0f22b6caee9efe99f2eebc5103a80f2c1e29)

src/osd/PeeringState.cc

index da5f11a3d1b2b0b1906c16dd66b78712d7ab87b3..fcb2fb359720d9ff7489b7ec25e3948134e6f71c 100644 (file)
@@ -7353,7 +7353,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();