linkedin / cruise-control

Cruise-control is the first of its kind to fully automate the dynamic workload rebalance and self-healing of a Kafka cluster. It provides great value to Kafka users by simplifying the operation of Kafka clusters.
https://github.com/linkedin/cruise-control/tags
BSD 2-Clause "Simplified" License
2.77k stars 595 forks source link

Number of brokers must be positive (-51) #2218

Open proggga opened 2 weeks ago

proggga commented 2 weeks ago

Not sure how to fix it, i'll create issue here, maybe someone could understand why is it happening

java.lang.IllegalArgumentException: Number of brokers must be positive (-51).
13 at com.linkedin.kafka.cruisecontrol.analyzer.ProvisionRecommendation$Builder.numBrokers(ProvisionRecommendation.java:85) ~[cruise-control-2.5.110.jar:?]
12 at com.linkedin.kafka.cruisecontrol.analyzer.goals.CapacityGoal.initGoalState(CapacityGoal.java:172) ~[cruise-control-2.5.110.jar:?]
11 at com.linkedin.kafka.cruisecontrol.analyzer.goals.AbstractGoal.optimize(AbstractGoal.java:94) ~[cruise-control-2.5.110.jar:?]
10 at com.linkedin.kafka.cruisecontrol.analyzer.GoalOptimizer.optimizations(GoalOptimizer.java:467) ~[cruise-control-2.5.110.jar:?]
9 at com.linkedin.kafka.cruisecontrol.analyzer.GoalOptimizer.optimizations(GoalOptimizer.java:403) ~[cruise-control-2.5.110.jar:?]
8 at com.linkedin.kafka.cruisecontrol.analyzer.GoalOptimizer$ProposalCandidateComputer.run(GoalOptimizer.java:599) ~[cruise-control-2.5.110.jar:?]
7 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
6 at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
5 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
4 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
3 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
2 at java.lang.Thread.run(Thread.java:829) ~[?:?]
proggga commented 2 weeks ago

our personal resolver get wrong data, probably it could get assert/check when this line become negative https://github.com/linkedin/cruise-control/blob/06a457748732284f40cdf9e24bcb8ea4d1dba489/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/analyzer/goals/CapacityGoal.java#L151C3-L151C92

and check if typical also become negative, otherwise it confuse as hell, maybe also print errors with message

https://github.com/linkedin/cruise-control/blob/06a457748732284f40cdf9e24bcb8ea4d1dba489/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/analyzer/goals/CapacityGoal.java#L164