Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement kafka controller routing #1419

Merged
merged 4 commits into from
Jan 15, 2024
Merged

Conversation

rukai
Copy link
Member

@rukai rukai commented Jan 11, 2024

Some requests need to be routed to a specific kafka broker known as the "controller broker".
However currently we never perform that routing.
This results in messages like CreateTopic having 2/3 chance of failing when sent to a 3 node kafka cluster.

This PR fixes that failure by:

  • Retrieving the controller broker from a metadata request when we receive our first request from the client.
    • The controller broker id is then stored to the KafkaSinkCluster shared state.
  • Using the controller broker to correctly route the CreateTopic message.

To ensure all the admin requests work, I have added an integration test which exercises most of it.
I've left a few bits of the integration test as TODOs, they can be addressed later.

Surprisingly CreateTopic is the only request I've seen so far that needs to be routed to the controller broker.

@rukai rukai marked this pull request as ready for review January 11, 2024 05:04
@rukai rukai requested a review from conorbros January 11, 2024 23:31
@rukai rukai enabled auto-merge (squash) January 15, 2024 10:45
@rukai rukai merged commit 361c910 into shotover:main Jan 15, 2024
40 checks passed
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