dengziming opened a new pull request #11784:
URL: https://github.com/apache/kafka/pull/11784


   *More detailed description of your change*
   Normally, a broker connects to the active controller to learn its 
ApiVersions, and in co-resident KRaft mode, a broker get the ApiVersions 
directly from binary code if the broker is also the activate controller. 
   
   But we only concerns `ApiKeys.zkBrokerApis()` when we call 
`NodeApiVersions.create()`, we should use `ApiKeys.controllerApiVersions` when 
in KRaft mode.
   
   *Summary of testing strategy (including rationale)*
   When I described quorum in Kraft mode I got 
`org.apache.kafka.common.errors.UnsupportedVersionException: The broker does 
not support DESCRIBE_QUORUM`.
   
   After this change, the DESCRIBE_QUORUM request was property handled and got 
a correct response:
   ```
   TopicData(topicName='__cluster_metadata', 
partitions=[PartitionData(partitionIndex=0, errorCode=0, leaderId=1, 
leaderEpoch=30, highWatermark=141, currentVoters=[ReplicaState(replicaId=1, 
logEndOffset=141)], observers=[])])
   ```
   
   And I also add an integration test for this.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to