Skip to content

Commit e26545f

Browse files
committed
PeeringState.cc: Only populate want_acting when num_osds < bucket_max
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 <[email protected]>
1 parent a00caf8 commit e26545f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/osd/PeeringState.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,9 @@ void PeeringState::calc_replicated_acting_stretch(
21062106
* and then by the ordering token of the next osd */
21072107
bucket_heap_t aheap;
21082108
std::for_each(ancestors.begin(), ancestors.end(), [&](auto &anc) {
2109-
aheap.push_if_nonempty(anc.second);
2109+
if (anc.second.get_num_selected() < bucket_max) {
2110+
aheap.push_if_nonempty(anc.second);
2111+
}
21102112
});
21112113

21122114
/* and pull from this heap until it's empty or we have enough.

0 commit comments

Comments
 (0)