You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/08/25 21:56:18 UTC

[GitHub] [kafka] splett2 commented on a change in pull request #11255: KAFKA-13225: Controller skips sending UpdateMetadataRequest when no change in partition state.

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



##########
File path: core/src/main/scala/kafka/controller/KafkaController.scala
##########
@@ -630,7 +630,7 @@ class KafkaController(val config: KafkaConfig,
 
     // If replica failure did not require leader re-election, inform brokers of the offline brokers
     // Note that during leader re-election, brokers update their metadata
-    if (partitionsWithOfflineLeader.isEmpty) {
+    if (newOfflineReplicas.isEmpty) {

Review comment:
       I'm still don't follow why the check for `partitionsWithOfflineLeader` is necessary.
   
   If the broker doesn't host any replicas, then we need to send out `UpdateMetadataRequest` because the partition state machines will not trigger any control requests.
   
   If the broker does host replicas, then shouldnt `replicaStateMachine.handleStateChanges(newOfflineReplicasNotForDeletion.toSeq, OfflineReplica)`
   handle sending out UpdateMetadataRequest to propagate the offline broker? `partitionsWithOfflineLeader.isEmpty` seems redundant.




-- 
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-unsubscribe@kafka.apache.org

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