]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: Optimized EC missing list not updated on recovering shard wip-billscales-issue73249
authorBill Scales <bill_scales@uk.ibm.com>
Wed, 1 Oct 2025 14:52:23 +0000 (15:52 +0100)
committerBill Scales <bill_scales@uk.ibm.com>
Tue, 7 Oct 2025 17:34:04 +0000 (18:34 +0100)
commit722e9c922516d8db105ed13ff9b73b3a732b1707
tree0708b32be2c20ba7cb04927cefd20f1731d643f7
parent39f1f07cc96fda4f17b154aecec2a57a9e1cc309
osd: Optimized EC missing list not updated on recovering shard

Shards that are recovering (last_complete != last_update) that
skip transactions and log entries because of partial writes are
using pwlc to advance last_update. However simply incrementing
last_update is not sufficient - there are scenarios where the
needed version of a missing object has to be updated.

If the shard is already missing object X at version V1 and there was
a partial write at V2 that did not update the shard, it does not need
to retain the log entry, but it does need to update the missing list
to say it needs V2 rather than V1. This ensures all shards report
a need for an object at the same version and avoids an assert in
MissingLoc::add_active_missing when the primary is trying to
combine the missing lists from all the shards to work out what has
to be recovered. Avoiding applying pwlc during the early phase
of the peering process ensures the missing list gets updated.

However if a shard is not missing object X and there was a partial
write at V2 that did not update the shard then at the end of peering
it is still necessary to advance last_upadte by applying pwlc. This
ensures that in later peering cycles the code does not change its
mind and think the shard is missing object X.

The fix is to be more sophisticated about when pwlc can be used
to advance last_update for a recovering shard. The code now
passes in a parameter indicating whether we are in the early
or later phase of peering. This also means that additional
calls to apply_pwlc are needed when searching for missing.

Fixes: https://tracker.ceph.com/issues/73249
Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
BILL: Experimental fix for MissingLoc

Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
src/osd/PeeringState.cc
src/osd/PeeringState.h