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

perf(cache): Use AddRateLimited for batch enqueue #5228

Merged
merged 3 commits into from
Apr 12, 2024
Merged

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Apr 12, 2024

Tracking issue

https://flyte-org.slack.com/archives/C05BN3A92SE/p1712926168291449
closed #5202

Why are the changes needed?

workqueue.Add will add all the item in the async cache to the queue at the same time and cause propeller to send N (number of items in the async cache) requests to the external system and some tasks may run into rate limit issue.

What changes were proposed in this pull request?

Use workqueue.AddRateLimited instead of workqueue.Add.

How was this patch tested?

Local Sandbox

Setup process

Screenshots

NA

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

NA

Docs link

NA

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Apr 12, 2024
kumare3
kumare3 previously approved these changes Apr 12, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 12, 2024
Signed-off-by: Kevin Su <[email protected]>
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Apr 12, 2024
Signed-off-by: Kevin Su <[email protected]>
@pingsutw pingsutw self-assigned this Apr 12, 2024
@pingsutw pingsutw merged commit 80ccda3 into master Apr 12, 2024
46 checks passed
@pingsutw pingsutw deleted the rate-limited branch April 12, 2024 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] webApi readRateLimiter settings are not respected
3 participants