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: wait for quota state after creation #385

Merged
merged 1 commit into from
Feb 20, 2024
Merged

fix: wait for quota state after creation #385

merged 1 commit into from
Feb 20, 2024

Conversation

sbuliarca
Copy link
Contributor

We are using this provider to maintain kafka resources, including quotas.
When creating and updating quotas is fails in 90% of cases because the provider creates it in kafka, and then immediately queries for it, but it doesn't find it at this point, as it seems it takes a little bit of time to appear in Kafka.

Here are the logs we were getting for such a scenario:

[INFO] Alter quota: timestamp="2024-02-19T12:46:14.578+0200"
[TRACE] Alter Quota Request &{0 [{[{user 0 User:CN=dev-enablement/test-tf-apply}] [{request_percentage 100 false} {consumer_byte_rate 5.24288e+06 false} {producer_byte_rate 5.24288e+06 false}]}] false}: timestamp="2024-02-19T12:46:14.578+0200"
[TRACE] ThrottleTime: 0: timestamp="2024-02-19T12:46:15.178+0200"
[INFO] Reading Quota: timestamp="2024-02-19T12:46:15.179+0200"
[INFO] Reading Quota User:CN=dev-enablement/test-tf-apply: timestamp="2024-02-19T12:46:15.179+0200"
[INFO] Describing Quota: timestamp="2024-02-19T12:46:15.179+0200"
[TRACE] Describe Quota Request &{0 [{user 0 User:CN=dev-enablement/test-tf-apply}] true}: timestamp="2024-02-19T12:46:15.179+0200"
[TRACE] ThrottleTime: 0: timestamp="2024-02-19T12:46:15.242+0200"
[ERROR] Error getting quota User:CN=dev-enablement/test-tf-apply could not be found from Kafka: timestamp="2024-02-19T12:46:15.242+0200"

With this fix, we'll be waiting until the quota is created in Kafka (just like for topics).
I tested this locally and it fixes the issue.

@Mongey
Copy link
Owner

Mongey commented Feb 20, 2024

Thanks! looks good

@Mongey Mongey merged commit 58d278d into Mongey:master Feb 20, 2024
3 of 4 checks passed
@sbuliarca
Copy link
Contributor Author

Thanks! looks good

@Mongey
Thank you for taking care of it so quickly!

When can we expect a new release containing this fix?

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.

2 participants