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


##########
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:
   That seems like a deadlock to me. If a controller can't receive RPC requests 
before having a valid metadata version, it can't communicate with other static 
voters initially. This means it's impossible to obtain a valid metadata version.
   
   The approach in #19127 doesn't completely fix the issue, but the issue 
occurs at the start of static votes. During that phase, the quorum isn't ready, 
so exposing the 3.3 MV via the API response should be low risk. 
   
   To clean up, if the above description is accurate, `SimpleApiVersionManager` 
can replace `featuresPublisher` with `MetadataCache` and manually add the 3.3 
MV to the API response when `MetadataCache` lacks a valid MV. That is basically 
equal to what #19127 does.



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