junrao commented on a change in pull request #9353:
URL: https://github.com/apache/kafka/pull/9353#discussion_r503597917
##########
File path: core/src/main/scala/kafka/controller/KafkaController.scala
##########
@@ -1907,6 +1915,20 @@ class KafkaController(val config: KafkaConfig,
}
callback.apply(response)
+
+ // After we have returned the result of the `AlterIsr` request, we should
check whether
+ // there are any reassignments which can be completed by a successful ISR
expansion.
+ response.left.foreach { alterIsrResponses =>
+ alterIsrResponses.forKeyValue { (topicPartition, partitionResponse) =>
+ if
(controllerContext.partitionsBeingReassigned.contains(topicPartition)) {
+ val isSuccessfulUpdate = partitionResponse.isRight
+ if (isSuccessfulUpdate) {
+ val assignment =
controllerContext.partitionFullReplicaAssignment(topicPartition)
+ onPartitionReassignment(topicPartition, assignment)
Review comment:
This old logic in processPartitionReassignmentIsrChange() does an info
logging before calling onPartitionReassignment(). Should we do the same thing
here?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]