pub fn homogeneous_member_quotas(
minimum_quota: usize,
extra_quotas: usize,
owned: &[usize],
) -> Vec<HomogeneousMemberQuota>Expand description
Every member’s quota in the homogeneous builder, in member order.
owned[i] is how many partitions of the subscribed topics member i
holds in its current target assignment. The contract states Kafka’s
balance-then-stickiness rule:
- Balance: each member’s target is
minimum_quotaorminimum_quota + 1, and exactlyextra_quotasmembers get the larger target, because no extra partition is left unclaimed after the last member. - Stickiness: each member keeps as much of its current ownership as its target allows, and receives only the difference.
- The extra slots go by
keeps_extra_quota, in member order.