Skip to content

Commit

Permalink
partition_balancer: abort planner tick on state changes
Browse files Browse the repository at this point in the history
aborts the balancer tick on node state changes.
  • Loading branch information
bharathv committed Jun 12, 2023
1 parent ba57559 commit 45686ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/v/cluster/partition_balancer_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ void partition_balancer_backend::on_members_update(
if (
state == model::membership_state::active
|| state == model::membership_state::draining) {
if (_tick_in_progress) {
_tick_in_progress->request_abort_ex(balancer_tick_aborted_exception{
fmt::format("new membership update: {}", state)});
}
maybe_rearm_timer(/*now = */ true);
}
}
Expand Down

0 comments on commit 45686ac

Please sign in to comment.