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

fix(client): ignore empty Metadata responses when refreshing #2672

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

HaoSunUber
Copy link
Contributor

@HaoSunUber HaoSunUber commented Oct 13, 2023

We should skip the metadata refresh if the startup phase broker returns empty brokers in metadata response. The Java client skips the empty response to update the metadata cache (https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java#L1149) and we should make a feature parity in Sarama too

Fixes #2664

…nse is empty

Fix IBM#2664

We should skip the metadata refresh if the startup phase broker returns empty brokers in metadata response. The Java client skips the empty response to update the metadata cache (https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java#L1149) and we should make a feature parity in Sarama too

Signed-off-by: Hao Sun <haos@uber.com>
@HaoSunUber
Copy link
Contributor Author

@dnwe Could you please take a look when getting a chance? Thanks

Copy link
Collaborator

@dnwe dnwe left a comment

Choose a reason for hiding this comment

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

@HaoSunUber thanks for finding and fixing this bug! Changes look good to me ⭐

@dnwe dnwe changed the title fix(client): Metadata refresh should skip updates when metadata respo… fix(client): ignore empty Metadata responses when refreshing Oct 13, 2023
@dnwe dnwe merged commit c42b2e0 into IBM:main Oct 13, 2023
12 checks passed
@dnwe dnwe added the fix label Oct 13, 2023
@HaoSunUber
Copy link
Contributor Author

@dnwe would you mind creating a new release including this change so that we can use it? Thanks so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metadata refresh should skip updates when metadata response is empty
2 participants