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

Calling statsInternal can cause topic creation to fail #5259

Closed
ivankelly opened this issue Sep 23, 2019 · 1 comment
Closed

Calling statsInternal can cause topic creation to fail #5259

ivankelly opened this issue Sep 23, 2019 · 1 comment
Labels
area/broker lifecycle/stale type/bug The PR fixed a bug or issue reported a bug

Comments

@ivankelly
Copy link
Contributor

Describe the bug
When creating a topic, if there is some other client querying stats (or probably many other things), then the creation can fail.

This is because of how BrokerService ensures that only one client can create the topic at a time. A future is inserted into a map for the topic. However, the computation for this future differs depending on where the call to get the topic comes from. If it comes from the admin interface, then it doesn't create the topic if missing. If it comes from producer creation, then it does create the topic if missing.

The problem occurs when a call comes in from the admin interface to get the topic, the future is inserted, then a call to get the topic comes in from producer creation. Producer creation will receive the previously saved future back which will not create the topic if missing, consequently failing the producer creation.

To Reproduce
Run this test case:
ivankelly@bda83c5

@tisonkun
Copy link
Member

Closed as stale. Please create a new issue if it's still relevant to the maintained versions.

@tisonkun tisonkun closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker lifecycle/stale type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

No branches or pull requests

4 participants