Skip to content

Commit bc3c9d1

Browse files
JonBailey1993aainscow
authored andcommitted
osd/scrubber: Fixes issue with the number of missing shards being counted incorrectly
The number of missing shards is being counted incorrectly in scrubbing when using erasure-coded pools that supported crc_encode_decode. This fix changes it so the number of available shards will be calculated correctly Signed-off-by: Jon Bailey <[email protected]>
1 parent e0e8117 commit bc3c9d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/osd/scrubber/scrub_backend.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ auth_selection_t ScrubBackend::select_auth_object(const hobject_t& ho,
572572
std::count_if(m_pg.get_ec_sinfo().get_data_shards().begin(),
573573
m_pg.get_ec_sinfo().get_data_shards().end(),
574574
[&available_shards](const auto& shard_id) {
575-
return available_shards.contains(shard_id);
575+
return !available_shards.contains(shard_id);
576576
});
577577

578578
const int num_redundancy_shards = m_pg.get_ec_sinfo().get_m();

0 commit comments

Comments
 (0)