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>
* 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.