cruise-control icon indicating copy to clipboard operation
cruise-control copied to clipboard

Surprising behaviour of `MinTopicLeadersPerBrokerGoal`

Open tronboto opened this issue 2 years ago • 0 comments
trafficstars

Hey. We have configured:

  • MinTopicLeadersPerBrokerGoal as a hard goal
  • min.topic.leaders.per.broker: 0
  • topics.with.min.leaders.per.broker: "^(?!team_).*"

with the intention of distributing the leaders for each topic (except for those prefixed with team_) evenly amongst all the brokers, no matter how many partitions the topic has. However, we were somewhat surprised to discover that by setting min.topic.leaders.per.broker to 0, the dynamic calculation of no-of-topic-leaders / no-of-brokers is seemingly taking the floor of this value. That is to say that when the number of partitions is less than the number of brokers or the number of brokers doesn't exactly divide the number of partitions, there is no best effort made to distribute these "remainder partition" leaders evenly amongst the rest of the brokers. Is there a reason for this? And would it be possible to change the goal so that it does? Thanks.

tronboto avatar Sep 19 '23 08:09 tronboto