Skip to content

Commit

Permalink
c/partition_balancer: improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ztlpn committed May 15, 2024
1 parent 45423ed commit 39a5ec4
Showing 1 changed file with 9 additions and 3 deletions.
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());

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

0 comments on commit 39a5ec4

Please sign in to comment.