-
Notifications
You must be signed in to change notification settings - Fork 694
Rety iterators #2087
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
Rety iterators #2087
Conversation
For some added context: when using this client in a high volume service I noticed the number of goroutines was roughly double what I expected. This was because for every routine executing an operation, another routine had spun up handling the retries. Adding this change would eliminate the need for a separate goroutine for the retry delays and improve performance |
804cb63
to
49299c2
Compare
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 like a solid refactor!
@tlyons-cs can you fix the linter errors? |
49299c2
to
ed417eb
Compare
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) | require | patch | `v7.0.88` -> `v7.0.90` | --- ### Release Notes <details> <summary>minio/minio-go (github.com/minio/minio-go/v7)</summary> ### [`v7.0.90`](https://github.com/minio/minio-go/releases/tag/v7.0.90): Bugfix v7.0.90 [Compare Source](minio/minio-go@v7.0.89...v7.0.90) #### What's Changed - Add anonymous chunked encoding with trailing headers by [@​klauspost](https://github.com/klauspost) in minio/minio-go#2084 - Implement AppendObject() API by [@​harshavardhana](https://github.com/harshavardhana) in minio/minio-go#2082 - Update x/net version by [@​BorjaOuterelo](https://github.com/BorjaOuterelo) in minio/minio-go#2085 - Rety iterators by [@​tlyons-cs](https://github.com/tlyons-cs) in minio/minio-go#2087 - Add function for getting creds of remote client by [@​shtripat](https://github.com/shtripat) in minio/minio-go#2089 #### New Contributors - [@​BorjaOuterelo](https://github.com/BorjaOuterelo) made their first contribution in minio/minio-go#2085 - [@​tlyons-cs](https://github.com/tlyons-cs) made their first contribution in minio/minio-go#2087 **Full Changelog**: minio/minio-go@v7.0.89...v7.0.90 ### [`v7.0.89`](https://github.com/minio/minio-go/releases/tag/v7.0.89): Bugfix Release [Compare Source](minio/minio-go@v7.0.88...v7.0.89) #### What's Changed - add PurgeOnDelete to versioning config by [@​poornas](https://github.com/poornas) in minio/minio-go#2074 - Adds `TokenRevokeType` field to credential providers. by [@​taran-p](https://github.com/taran-p) in minio/minio-go#2075 - make downtime info as map to denote per target info by [@​Praveenrajmani](https://github.com/Praveenrajmani) in minio/minio-go#2079 - update deps and move CI/CD to go1.23, go1.24 by [@​harshavardhana](https://github.com/harshavardhana) in minio/minio-go#2080 - update golint version by [@​harshavardhana](https://github.com/harshavardhana) in minio/minio-go#2083 #### New Contributors - [@​taran-p](https://github.com/taran-p) made their first contribution in minio/minio-go#2075 **Full Changelog**: minio/minio-go@v7.0.88...v7.0.89 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzMuNSIsInVwZGF0ZWRJblZlciI6IjM5LjIzMy41IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=--> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7495 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
With the transition to go 1.23 the internal retry goroutine+channel can be replaced with an iter.Seq[int]. This reduces the memory allocation of a new goroutine and the extra overhead for waiting on the receipt/done channels.