]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
PeeringState.cc: Only populate want_acting when num_osds < bucket_max
authorKamoltat <ksirivad@redhat.com>
Thu, 9 May 2024 20:18:51 +0000 (20:18 +0000)
committerroot <root@vossi06.front.sepia.ceph.com>
Wed, 7 Aug 2024 14:10:34 +0000 (14:10 +0000)
Currently, in `calc_replicated_acting_stretch` we would
call `pop_ancester` before checking whether the next
OSD we populate in the want_acting set would have
the ancestor count that is >= bucket_max.

Fixes: https://tracker.ceph.com/issues/65371
Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit e26545f86f93985569d3a7b2749e9ad77a40deea)

src/osd/PeeringState.cc

index 38ff7722b8b24e5fac73c2fb21c9037b8093691b..ade6c558218abf39ff319cfe7e2ba287c3ee3041 100644 (file)
@@ -2102,7 +2102,9 @@ void PeeringState::calc_replicated_acting_stretch(
    * and then by the ordering token of the next osd */
   bucket_heap_t aheap;
   std::for_each(ancestors.begin(), ancestors.end(), [&](auto &anc) {
-    aheap.push_if_nonempty(anc.second);
+    if (anc.second.get_num_selected() < bucket_max) {
+      aheap.push_if_nonempty(anc.second);
+    }
   });
 
   /* and pull from this heap until it's empty or we have enough.