Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cluster: consider shard0 reserve in check_cluster_limits
Improve the user error feedback when the `topic_partitions_reserve_shard0` cluster config is used and a user tried to allocate a topic that is above the partition limits. Previously this check was only considered as part of the `max_final_capacity` hard constraint, which meant that the kafka error message was more vague (No nodes are available to perform allocation after hard constraints were solved) and there were no clear broker logs to indicate this. Now this is also considered inside `check_cluster_limits` which leads to more specific error messages on both the kafka api (unable to create topic with 20 partitions due to hardware constraints) and in broker logs: ``` WARN 2024-11-29 13:18:13,907 [shard 0:main] cluster - partition_allocator.cc:183 - Refusing to create 20 partitions as total partition count 20 would exceed the core-based limit 18 (per-shard limit: 20, shard0 reservation: 2) ``` (cherry picked from commit b632190)
- Loading branch information