Skip to content
Merged
Changes from all commits
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
7 changes: 5 additions & 2 deletions pkg/apply/assigners/evaluate.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,15 @@ func EvaluateAssignments(
case config.PlacementStrategyCrossRack:
brokerRacks := admin.BrokerRacks(brokers)
for _, assignment := range assignments {
// If a topicctl rebalance gets stopped while running, we can be in a state where
// multiple replicas are on the same rack. This should be fixed on a re-run with
// cross-rack assignment.
if len(assignment.Replicas) != len(assignment.DistinctRacks(brokerRacks)) {
log.Errorf(
log.Warnf(
"Expected replicas to equal number of racks, but got %d replicas and %d racks for assignment %v",
len(assignment.Replicas), len(assignment.DistinctRacks(brokerRacks)), assignment,
)
return false, nil
return true, nil
}
}
return true, nil
Expand Down