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

api: optimize the backoff for wait eni #559

Closed
wants to merge 1 commit into from

Conversation

l1b0k
Copy link
Collaborator

@l1b0k l1b0k commented Jan 22, 2024

No description provided.

@l1b0k l1b0k requested a review from BSWANG January 22, 2024 11:19
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 18.17%. Comparing base (99ddd72) to head (5634388).

❗ Current head 5634388 differs from pull request most recent head 8300be8. Consider uploading reports for the commit 8300be8 to get more accurate results

Files Patch % Lines
pkg/eni/local.go 0.00% 5 Missing ⚠️
pkg/eni/types.go 0.00% 3 Missing ⚠️
types/daemon/res.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #559      +/-   ##
==========================================
- Coverage   18.17%   18.17%   -0.01%     
==========================================
  Files         107      107              
  Lines       12448    12449       +1     
==========================================
  Hits         2262     2262              
- Misses       9868     9869       +1     
  Partials      318      318              
Flag Coverage Δ
unittests 18.17% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

return false, false, nil
}

waitSequence := []time.Duration{3 * time.Second, 1 * time.Second, 1 * time.Second, 5 * time.Second, 10 * time.Second, 20 * time.Second, 30 * time.Second}
Copy link
Member

Choose a reason for hiding this comment

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

any jitter needed?

}
bo := backoff.NewBackoffManager(waitSequence, conditionFunc, throttleFunc)
for {
done, err := bo.Next(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

process retries in manager?

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