splett2 commented on a change in pull request #11255:
URL: https://github.com/apache/kafka/pull/11255#discussion_r700656961



##########
File path: core/src/main/scala/kafka/controller/KafkaController.scala
##########
@@ -628,9 +628,9 @@ class KafkaController(val config: KafkaConfig,
       topicDeletionManager.failReplicaDeletion(newOfflineReplicasForDeletion)
     }
 
-    // If replica failure did not require leader re-election, inform brokers 
of the offline brokers
+    // If no partitions are affected, inform brokers of the offline brokers
     // Note that during leader re-election, brokers update their metadata
-    if (partitionsWithOfflineLeader.isEmpty) {
+    if (newOfflineReplicasNotForDeletion.isEmpty && 
onlineStateChangeResults.values.forall(_.isLeft)) {

Review comment:
       how so?
   I thought that `partitionStateMachine.triggerOnlinePartitionStateChange()` 
handles partition transitions from offline/new => online, whereas
   
`replicaStateMachine.handleStateChanges(newOfflineReplicasNotForDeletion.toSeq, 
OfflineReplica)` handles the replicas on the current broker going offline. I 
would have thought that these are sort of orthogonal, and that we would need to 
check both.




-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to