dajac opened a new pull request, #23734:
URL: https://github.com/apache/kafka/pull/23734
Depends on #23733: only the last commit belongs to this PR.
uniform2 decides how many partitions of every topic each member gets in
three steps, keep, hand out and balance. The balance step moves extra
partitions from members with large assignments to members with small
ones.
This patch adds `ExtraPartitionMoves`, which the balance step uses to
choose and make these moves:
- It keeps the extra partitions of every member in two lists, those of
topics it owns more than the base partitions of, and the free ones.
A transfer gives the cheapest extra partition that the receiver can
take: one that saves a move, then one that costs none, then one that
costs a move.
- It tells whether a receiver can take an extra partition from a giver,
and counts the extra partitions of a giver per cohort, those of
topics that the cohort subscribes to, to find receivers fast.
- The counts are kept for every member when they fit, and for one
member at a time otherwise; the subscriptions are compared as bit
sets when they fit.
The balance step comes in the next patch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]