Skip to content

feat(routerchannel): support api for querying RouterChannelEpoch#3331

Merged
allenzhu merged 3 commits into
mainfrom
routerchannel_epoch
Apr 29, 2026
Merged

feat(routerchannel): support api for querying RouterChannelEpoch#3331
allenzhu merged 3 commits into
mainfrom
routerchannel_epoch

Conversation

@allenzhu
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 22, 2026 03:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds RouterChannelEpoch visibility through the existing AutoMQ getNodes API so clients/tools can query the cluster-level router channel epoch from the controller.

Changes:

  • Expose RouterChannelEpoch from RouterChannelEpochControlManager and attach it to AutomqGetNodesResponse.
  • Extend the protocol schema (AutomqGetNodesResponse.json) with a tagged RouterChannelEpoch struct.
  • Extend AdminClient GetNodesResult / KafkaAdminClient#getNodes to surface the epoch to callers; print it in automq-shell cluster describe.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
metadata/src/main/java/org/apache/kafka/controller/stream/RouterChannelEpochControlManager.java Adds an accessor to expose the current RouterChannelEpoch.
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java Populates RouterChannelEpoch into AutomqGetNodesResponseData.
clients/src/main/resources/common/message/AutomqGetNodesResponse.json Adds a tagged RouterChannelEpoch field/struct to the response schema.
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java Parses RouterChannelEpoch from response and returns it via an additional future.
clients/src/main/java/org/apache/kafka/clients/admin/GetNodesResult.java Adds routerChannelEpoch() future and a RouterChannelEpoch value class.
automq-shell/src/main/java/com/automq/shell/commands/cluster/Describe.java Displays RouterChannelEpoch in cluster describe output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread clients/src/main/java/org/apache/kafka/clients/admin/GetNodesResult.java Outdated
Comment thread automq-shell/src/main/java/com/automq/shell/commands/cluster/Describe.java Outdated
@allenzhu allenzhu merged commit 1f8fff9 into main Apr 29, 2026
6 checks passed
@allenzhu allenzhu deleted the routerchannel_epoch branch April 29, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants