-
Notifications
You must be signed in to change notification settings - Fork 107
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 request context cancellation is ignored when retryBackoff (#539) #540
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #540 +/- ##
===========================================
+ Coverage 57.29% 67.99% +10.70%
===========================================
Files 315 376 +61
Lines 9823 8862 -961
===========================================
+ Hits 5628 6026 +398
+ Misses 2902 1555 -1347
+ Partials 1293 1281 -12
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Thanks. I'd love some additions to the docs on retries and back offs, can be a separate topic in https://github.com/opensearch-project/opensearch-go/tree/main/guides or https://github.com/opensearch-project/opensearch-go/blob/main/USER_GUIDE.md, but something generic enough on configuring the client? Since you reference Elastic in #539, can you please confirm that you're not bringing in any non-APLv2 code in this project? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix DCO, run git commit -s --amend
. Thanks.
7ff3db9
to
c61f664
Compare
I added a very simple doc about configuring the client with retries and backoffs.
Yes, I can confirm that. I also found the client will sleep when the last retry failed, which seems not expected. So I pushed another fix (8b2649c) for it. Please have a look. Thanks! |
Good find. This deserves its own test, too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. @Jakob3xD should take a look / merge, I am not super familiar with ways to do this in Go, I might be missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a small nit about the indent of the guide but good to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging, thanks!
I don't think we want an entire guide for retry and backoff. Maybe a "Configuration" doc that has a "Retries" section (and other configuration options)? @zhyu interested in (re)organizing things?
@zhyu Can you please take a quick look at the failing integration tests?
I am not sure it's related, but could be. If it's a flake, check whether we already have an issue for it / open a new one. |
The tests are failing because the new opensearch release adds a new field. Not related to the PR. |
Signed-off-by: zhyu <[email protected]>
Signed-off-by: zhyu <[email protected]>
Co-authored-by: Jakob <[email protected]> Signed-off-by: Yu Zhang <[email protected]>
Fixes #539
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.