dengziming opened a new pull request #9622: URL: https://github.com/apache/kafka/pull/9622
*More detailed description of your change, if necessary. The PR title and PR message become the squashed commit message, so use a separate comment to ping reviewers.* 1. Bump the version of MetadataReq and MetadataResp, add topicId in MetadataResp 2. Alter describeTopic in AdminClientTopicService and ZookeeperTopicService 3. TopicMetadata is cached in MetadataCache, so we need to add topicId to MetadataCache 4. MetadataCache is updated by UpdateMetadataRequest, bump the version of UpdateMetadataReq and UpdateMetadataResp, add topicId in UpdateMetadataReq. *Summary of testing strategy (including rationale) for the feature or bug fix. Unit and/or integration tests are expected for any behaviour change and system tests should be considered for larger changes.* Tested locally, here is some result: New server + new Client : kafka-topics.sh --describe --zookeeper localhost:2181 --topic old-version-topic Topic: old-version-topic TopicId: wRPl6VAlQeyE77bDxEESzg PartitionCount: 2 ReplicationFactor: 1 Configs: Topic: old-version-topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0 Topic: old-version-topic Partition: 1 Leader: 0 Replicas: 0 Isr: 0 kafka-topics.sh --describe --bootstrap-server localhost:9092 --topic old-version-topic Topic: old-version-topic TopicId: wRPl6VAlQeyE77bDxEESzg PartitionCount: 2 ReplicationFactor: 1 Configs: segment.bytes=1073741824 Topic: old-version-topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0 Topic: old-version-topic Partition: 1 Leader: 0 Replicas: 0 Isr: 0 Old Server + new Client kafka-topics.sh --describe --bootstrap-server localhost:9092 --topic old-version-topic Topic: old-version-topic TopicId: PartitionCount: 2 ReplicationFactor: 1 Configs: segment.bytes=1073741824 Topic: old-version-topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0 Topic: old-version-topic Partition: 1 Leader: 0 Replicas: 0 Isr: 0 New server + old client kafka-topics.sh --describe --bootstrap-server localhost:9092 --topic old-version-topic Topic: old-version-topic PartitionCount: 2 ReplicationFactor: 1 Configs: segment.bytes=1073741824 Topic: old-version-topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0 Topic: old-version-topic Partition: 1 Leader: 0 Replicas: 0 Isr: 0 ### 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org