]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/scrub: rename authoritative_set to 'all_chunk_objects' wip-rf-oneauth-tst2
authorRonen Friedman <rfriedma@redhat.com>
Thu, 11 Sep 2025 09:38:22 +0000 (04:38 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Thu, 11 Sep 2025 09:38:22 +0000 (04:38 -0500)
as 'authoritative', in multiple combinations and abbreviations, is
way too overloaded in the scrub-backend code.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/scrub_backend.cc
src/osd/scrubber/scrub_backend.h

index 615859988e08f785193a98450c169564f1b5abe8..39258e3caeb1b40408a516260fd5abe8d69a3ace 100644 (file)
@@ -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<ceph_subsys_osd, 15>()) {
@@ -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) {
index de65d7f7cb3c74032ee4f634659337f89b93ad91..7b0bdaf1d9ebba955ed6914dca6aab0e3fc086aa 100644 (file)
@@ -278,7 +278,7 @@ struct scrub_chunk_t {
   std::map<pg_shard_t, ScrubMap> received_maps;
 
   /// a collection of all objs mentioned in the maps
-  std::set<hobject_t> authoritative_set;
+  std::set<hobject_t> 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();