KAFKA-10547; add topicId in MetadataResp#9622
Conversation
|
@rajinisivaram @jolshan Hi, PTAL. |
|
Hi @dengziming! Thanks for the PR! I was hoping to add LeaderAndIsrRequests before UpdateMetadata/Metadata, following the ordering of the JIRA tickets. There are just a few features for persisting the topic IDs I wanted to include. I'm thinking we could review this PR and my PR: #9626 at the same time and merge mine first and yours immediately after. |
aefa813 to
af6e8a1
Compare
|
@dengziming Looks pretty good so far to me! I think it would be useful to write a few unit/integration tests to ensure the metadata snapshot behavior and describe topics work as expected. |
af6e8a1 to
54a2236
Compare
I added/altered some unit/integration tests in |
aa82c71 to
6b3a0e6
Compare
rajinisivaram
left a comment
There was a problem hiding this comment.
@dengziming Thanks for the PR, looks good. Left some comments.
core/src/test/scala/unit/kafka/controller/ControllerChannelManagerTest.scala
Outdated
Show resolved
Hide resolved
rajinisivaram
left a comment
There was a problem hiding this comment.
@dengziming Thanks for the updates, looks good, just a couple more comments left.
clients/src/main/java/org/apache/kafka/common/requests/MetadataResponse.java
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/server/MetadataRequestTest.scala
Outdated
Show resolved
Hide resolved
5e59937 to
680308e
Compare
rajinisivaram
left a comment
There was a problem hiding this comment.
@dengziming Thanks for the update, just one minor comment left, apart from that LGTM.
KAFKA-10547; alter some integration tests KAFKA-10547; optimeze imports resolve comments
680308e to
587c0e0
Compare
rajinisivaram
left a comment
There was a problem hiding this comment.
@dengziming Thanks for the update, LGTM. Will review PR #9626 as well and merge these two together, hopefully later today.
|
There is a compilation failure in the Java 8 build because the PR uses an API not available in Scala 2.12. Will push a fix. |
|
@dengziming Thanks for the PR, merging to trunk. |
More detailed description of your change
Summary of testing strategy (including rationale)
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 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)