]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: Optimized EC calculate_maxles_and_minlua needs to use ...
authorBill Scales <bill_scales@uk.ibm.com>
Fri, 1 Aug 2025 10:48:18 +0000 (11:48 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Wed, 17 Sep 2025 08:43:26 +0000 (09:43 +0100)
commit43fdccd8911758df6833c1806e4c797b1bced9a8
tree96678ba09f53c15ca193417af50a187618bff261
parent56fbf22db3b393fdcf69442b23fae7f694fdef89
osd: Optimized EC calculate_maxles_and_minlua needs to use ...
exclude_nonprimary_shards

When an optimized EC pool is searching for the best shard that
isn't a non-primary shard then the calculation for maxles and
minlua needs to exclude nonprimary-shards

This bug was seen in a test run where activating a PG was
interrupted by a new epoch and only a couple of non-primary
shards became active and updated les. In the next epoch
a new primary (without log) failed to find a shard that
wasn't non-primary with the latest les. The les of
non-primary shards should be ignored when looking for
an appropriate shard to get the full log from.

This is safe because an epoch cannot start I/O without
at least K shards that have updated les, and there
are always K-1 non-primary shards. If I/O has started
then we will find the latest les even if we skip
non-primary shards. If I/O has not started then the
latest les ignoring non-primary shards is the
last epoch in which I/O was started and has a good
enough log+missing list.

Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
(cherry picked from commit 72d55eec85afa4c00fac8dc18a1fb49751e61985)
src/osd/PeeringState.cc
src/osd/PeeringState.h