From a3136ab7ae0bf0b8604cc596fe2485eba19ad459 Mon Sep 17 00:00:00 2001 From: Ronen Friedman Date: Thu, 11 Sep 2025 04:38:22 -0500 Subject: [PATCH] osd/scrub: rename authoritative_set to 'all_chunk_objects' as 'authoritative', in multiple combinations and abbreviations, is way too overloaded in the scrub-backend code. Signed-off-by: Ronen Friedman --- src/osd/scrubber/scrub_backend.cc | 14 +++++++------- src/osd/scrubber/scrub_backend.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/osd/scrubber/scrub_backend.cc b/src/osd/scrubber/scrub_backend.cc index 615859988e0..39258e3caeb 100644 --- a/src/osd/scrubber/scrub_backend.cc +++ b/src/osd/scrubber/scrub_backend.cc @@ -160,7 +160,7 @@ void ScrubBackend::merge_to_authoritative_set() { dout(15) << __func__ << dendl; ceph_assert(m_scrubber.is_primary()); - ceph_assert(this_chunk->authoritative_set.empty() && + ceph_assert(this_chunk->all_chunk_objects.empty() && "the scrubber-backend should be empty"); if (g_conf()->subsys.should_gather()) { @@ -177,8 +177,8 @@ void ScrubBackend::merge_to_authoritative_set() for (const auto& map : this_chunk->received_maps) { std::transform(map.second.objects.begin(), map.second.objects.end(), - std::inserter(this_chunk->authoritative_set, - this_chunk->authoritative_set.end()), + std::inserter(this_chunk->all_chunk_objects, + this_chunk->all_chunk_objects.end()), [](const auto& i) { return i.first; }); } } @@ -288,7 +288,7 @@ void ScrubBackend::update_authoritative() // nothing to fix. Just count OMAP stats // (temporary code - to be removed once scrub_compare_maps() // is modified to process object-by-object) - for (const auto& ho : this_chunk->authoritative_set) { + for (const auto& ho : this_chunk->all_chunk_objects) { const auto it = my_map().objects.find(ho); // all objects in the authoritative set should be there, in the // map of the sole OSD @@ -850,11 +850,11 @@ shard_as_auth_t ScrubBackend::possible_auth_shard(const hobject_t& obj, void ScrubBackend::compare_smaps() { dout(10) << __func__ - << ": authoritative-set #: " << this_chunk->authoritative_set.size() + << ": authoritative-set #: " << this_chunk->all_chunk_objects.size() << dendl; - std::for_each(this_chunk->authoritative_set.begin(), - this_chunk->authoritative_set.end(), + std::for_each(this_chunk->all_chunk_objects.begin(), + this_chunk->all_chunk_objects.end(), [this](const auto& ho) { if (auto maybe_clust_err = compare_obj_in_maps(ho); maybe_clust_err) { diff --git a/src/osd/scrubber/scrub_backend.h b/src/osd/scrubber/scrub_backend.h index de65d7f7cb3..7b0bdaf1d9e 100644 --- a/src/osd/scrubber/scrub_backend.h +++ b/src/osd/scrubber/scrub_backend.h @@ -278,7 +278,7 @@ struct scrub_chunk_t { std::map received_maps; /// a collection of all objs mentioned in the maps - std::set authoritative_set; + std::set all_chunk_objects; utime_t started{ceph_clock_now()}; @@ -430,7 +430,7 @@ class ScrubBackend { /** * merge_to_authoritative_set() updates * - this_chunk->maps[from] with the replicas' scrub-maps; - * - this_chunk->authoritative_set as a union of all the maps' objects; + * - this_chunk->all_chunk_objects as a union of all the maps' objects; */ void merge_to_authoritative_set(); -- 2.39.5