Skip to content

Commit

Permalink
c/partition_balancer: don't finish rebalance if some ntps are immutable
Browse files Browse the repository at this point in the history
Previously, we finished counts rebalance if no new moves could be
found, even when some partitions were not moveable. This could lead to
finishing too early and not achieving balanced distribution when many
partitions were not moveable (e.g. because they are disabled due to
recovery mode).
  • Loading branch information
ztlpn committed May 15, 2024
1 parent 39a5ec4 commit 46e7a58
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/v/cluster/partition_balancer_planner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,10 @@ ss::future<> partition_balancer_planner::get_counts_rebalancing_actions(
}
}
},
[&](immutable_partition& p) {
p.report_failure(change_reason::partition_count_rebalancing);
should_stop = false;
},
[](auto&) {});

return ss::stop_iteration::no;
Expand Down

0 comments on commit 46e7a58

Please sign in to comment.