Skip to content

Commit

Permalink
[LI-FIXUP] Rollback to original replicas instead of original alive re…
Browse files Browse the repository at this point in the history
…plicas on parition assignment cancellation (#445)

This should be a direct fix-up to the commit 
- 28cca3e Cancellation of reassignments allowed if the resulting ISR is at min-ISR (#442)
  • Loading branch information
CCisGG authored Mar 14, 2023
1 parent 83d5cc2 commit 9addd61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/kafka/controller/KafkaController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2322,7 +2322,7 @@ class KafkaController(val config: KafkaConfig,
val aliveOriginalReplicas = replicaAssignment.originReplicas.toSet.intersect(controllerContext.liveBrokerIds);
if (aliveOriginalReplicas.size >= config.liMinOriginalAliveReplicas) {
// If there are enough original replicas alive (to maintain minISR), we allow the cancellation to go through
Right(aliveOriginalReplicas.toSeq)
Right(replicaAssignment.originReplicas)
} else {
// If there are not enough alive replicas in the original set, we don't allow the cancellation to go though.
Left(new ApiError(Errors.INVALID_REPLICA_ASSIGNMENT,
Expand Down

0 comments on commit 9addd61

Please sign in to comment.