Skip to content

Commit

Permalink
Merge pull request #4676 from vbotbuildovich/backport-4544-v22.1.x-731
Browse files Browse the repository at this point in the history
[v22.1.x] cluster: fix disabling leader balancer at runtime
  • Loading branch information
jcsp committed May 11, 2022
2 parents 8c07996 + 19a6383 commit d1a4e00
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/v/cluster/scheduling/leader_balancer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ void leader_balancer::trigger_balance() {
vlog(
clusterlog.info, "Cannot start rebalance until previous fiber exits");
_timer.arm(_idle_timeout());
return;
}

if (!_enabled()) {
Expand Down Expand Up @@ -187,6 +188,10 @@ void leader_balancer::trigger_balance() {
}

ss::future<ss::stop_iteration> leader_balancer::balance() {
if (!_enabled()) {
co_return ss::stop_iteration::yes;
}

/*
* GC the muted and last leader indices
*/
Expand Down

0 comments on commit d1a4e00

Please sign in to comment.