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: stop Utils#createTopic trying to create topic if admin client gets closed #184

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

k-wall
Copy link
Contributor

@k-wall k-wall commented Sep 21, 2023

Type of change

  • Bugfix

Description

Break out of the createTopic creation loop if the RetriableException message indicates that the Admin client is closed. This prevents a thread pointlessly spinning in the background, failing forever.

Please describe your pull request

Additional Context

Why are you making this pull request?

Checklist

Please go through this checklist and make sure all applicable tasks have been done

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Reference relevant issue(s) and close them after merging
  • Update CHANGELOG.md

@k-wall k-wall changed the title fix: stop trying to create topic if admin client gets closed fix: stop Utils#createTopic trying to create topic if admin client gets closed Sep 21, 2023
@k-wall k-wall linked an issue Sep 21, 2023 that may be closed by this pull request
@k-wall
Copy link
Contributor Author

k-wall commented Sep 25, 2023

@SamBarker what do you think to committing this change? I think in the long term, the Kafka Client needs a fix, but this would improve the behaviour in the meanwhile.

Copy link
Member

@SamBarker SamBarker left a comment

Choose a reason for hiding this comment

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

Its nasty but if the Admin client is going to lie to us about the type of error then I don't see we can do much else.

@k-wall
Copy link
Contributor Author

k-wall commented Sep 26, 2023

I'll comment the nastiness with a note about https://issues.apache.org/jira/browse/KAFKA-15507. Hopefully we can kill the code one day.

… admin client gets closed

workaround for KAFKA-15507
@sonarcloud
Copy link

sonarcloud bot commented Sep 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@k-wall k-wall merged commit 4686a48 into kroxylicious:main Sep 26, 2023
3 checks passed
@k-wall k-wall deleted the issue-182 branch September 26, 2023 10:28
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.

Tight loop while trying too manage consistencyTest topic
2 participants