FrankYang0529 commented on code in PR #18685:
URL: https://github.com/apache/kafka/pull/18685#discussion_r1986040272


##########
core/src/main/scala/kafka/server/metadata/KRaftMetadataCache.scala:
##########
@@ -522,10 +522,14 @@ class KRaftMetadataCache(
     if (kraftVersionLevel > 0) {
       finalizedFeatures.put(KRaftVersion.FEATURE_NAME, kraftVersionLevel)
     }
+    var metadataVersion = MetadataVersion.MINIMUM_VERSION

Review Comment:
   @chia7712 @cmccabe @ijuma @junrao, I found that we cannot add the check of 
`uninitializedPublishers.isEmpty()` at the end of `ControllerServer#startup`. 
If users use static voter (`controller.quorum.voters`), the `NetworkClient` 
tries to send `ApiVersionsReqeust` to other voters [0]. After it receives error 
response, it disconnects the connection [1]. At the meantime, the 
`KafkaRaftClient` tries to send `VoteRequest` [2], but the request cannot be 
sent cause of disconnection. Finally, none of controller can be ready with 
empty `uninitializedPublishers`.
   
   Do we want to use another Jira to track this issue? The original issue is 
resolved by #19127.
   
   [0]
   
https://github.com/apache/kafka/blob/947c414a8c0d30223c725a91507b2d891d5851e2/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java#L1087-L1089
   
   [1]
   
https://github.com/apache/kafka/blob/947c414a8c0d30223c725a91507b2d891d5851e2/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java#L1027-L1031
   
   [2]
   
https://github.com/apache/kafka/blob/947c414a8c0d30223c725a91507b2d891d5851e2/raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java#L3161-L3164



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