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

don't rate limit key when registering handlers #5

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

kinarashah
Copy link
Member

@kinarashah kinarashah commented Apr 8, 2021

Problem:
EnqueueKey rate limits the key and is called by sharedcontroller's RegisterHandler.
This is an issue because on startup we start enqueuing each key for each handler, causing the rate limit duration spike to hours very quickly.

Solution:
Adding the key to workqueue directly in EnqueueKey. Also what we used to do it 2.4.x,
https://github.com/rancher/norman/blob/release/v2.4/controller/generic_controller.go#L187

rancher/rancher#31999

Problem:
EnqueueKey rate limits the key and is called by sharedcontroller's RegisterHandler.
This is an issue because on startup we start enqueuing each key for each handler, causing the rate limit duration spike to hours very quickly.

Solution:
Adding the key to workqueue directly in EnqueueKey. This is what 2.4.x did as well,
https://github.com/rancher/norman/blob/release/v2.4/controller/generic_controller.go#L187
@kinarashah kinarashah merged commit 9ddd937 into rancher:master Apr 8, 2021
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.

None yet

3 participants