]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: Deleting PG should discard pwlc wip-billscales-issue74048
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>
Thu, 4 Dec 2025 13:17:08 +0000 (13:17 +0000)
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>
src/osd/PeeringState.cc

index b6a7ceeec726204c1bf7339701884e04408d01d7..ea1fd9dc737f709900d9bf0bdbb818e120b75a79 100644 (file)
@@ -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();