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

Re-queue Failed Items from the Work-queue #326

Merged
merged 3 commits into from
Oct 9, 2020

Conversation

dvaldivia
Copy link
Collaborator

@dvaldivia dvaldivia commented Oct 9, 2020

Right now, when we fail a work item (due to an error) we don't requeue the item, now that we are not needlessly triggering our tenant informer via status updates we need to requeue the work items whenever they fail.

Introduces MinIOControllerRateLimiter which will make it so the re-queue exponential backoff times are always between 5s and 60s

@harshavardhana
Copy link
Member

harshavardhana commented Oct 9, 2020

Re-queue Filed Items from the Work-queue

You meant to say

Re-queue Failed Items from the Work-queue ??

@dvaldivia dvaldivia changed the title Re-queue Filed Items from the Work-queue Re-queue Failed Items from the Work-queue Oct 9, 2020
@dvaldivia
Copy link
Collaborator Author

@harshavardhana hahaha yes, let me try to amend the commit

@dvaldivia dvaldivia force-pushed the requeue-failed-items branch from c052668 to ba73ba5 Compare October 9, 2020 05:07
harshavardhana
harshavardhana previously approved these changes Oct 9, 2020
@@ -233,6 +238,7 @@ func NewController(
tenantInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: controller.enqueueTenant,
UpdateFunc: func(old, new interface{}) {
// TODO: compare old vs new and don't enqueue if they are identical
Copy link
Member

Choose a reason for hiding this comment

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

Can you not use reflect.Equal(old, new) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's a package from kubernetes for that equality.Semantic.DeepEqual and equality.Semantic.DeepDerivative I experimented with both, they didn't work quite as I expected, I'll keep looking into it.

@dvaldivia dvaldivia merged commit 2abf608 into minio:master Oct 9, 2020
@dvaldivia dvaldivia deleted the requeue-failed-items branch October 9, 2020 17:05
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.

3 participants