Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORE-1972 don't mark rebalance complete if some partitions are not moveable #18489

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/v/cluster/partition_balancer_planner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1275,11 +1275,17 @@ void partition_balancer_planner::reassignable_partition::revert(
_reallocated->partition.is_original(move.previous()->node_id),
"ntp {}: move {}->{} should have been from original node",
_ntp,
move.current(),
move.previous());
move.previous(),
move.current());
Comment on lines 1277 to +1279
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not confusing at all!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an assert so I guess nobody noticed 🤷‍♂️ no idea why I wrote it like this in the first place


auto err = _reallocated->partition.try_revert(move);
vassert(err == errc::success, "ntp {}: revert error: {}", _ntp, err);
vlog(
clusterlog.info,
"ntp {}: reverted previously scheduled move {} -> {}",
_ntp,
move.previous()->node_id,
move.current().node_id);

{
// adjust topic node counts
Expand Down Expand Up @@ -1956,7 +1962,7 @@ ss::future<> partition_balancer_planner::get_counts_rebalancing_actions(
double cur_objective = calc_objective(domain);
vlog(
clusterlog.info,
"counts rebalancing objective in domain {}: {:6} -> {:6}",
"counts rebalancing objective in domain {}: {:.6} -> {:.6}",
domain,
orig_objective,
cur_objective);
Expand Down