-
Notifications
You must be signed in to change notification settings - Fork 3.8k
stability: multipart fetch pool #12205
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @azr. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
50ee2e3 to
bdcc07a
Compare
bdcc07a to
1f31369
Compare
ae2a666 to
36d4544
Compare
15c25cf to
04ffc4b
Compare
227b04e to
a4ab73e
Compare
| body = &fnOnClose{ | ||
| BeforeClose: func() { | ||
| cancelCtx() | ||
| if err := eg.Wait(); err != nil { |
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.
I think we still need cancelctx call here and then wait.
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.
cancelCtx does not exist anymore in this case. the ctx will be cancelled when all eg (error group) goroutines have returned. ( and if any return with an error eg will return without waiting for the others )
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.
If there is error returned by Line 595, BeforeClose will be closed in defer. But there is no cancel event, right? the close will be waiting until all the goroutines finish. Is it correct?
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.
ha this is a very very good point, added a cancel.
977a93a to
cca6ba5
Compare
637bc96 to
706ab62
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.
Pull Request Overview
This PR enhances the stability of the multipart fetch pool implementation by addressing potential resource leaks and improving error handling in parallel download scenarios.
Key changes:
- Resets buffers before returning them to the pool to prevent data leakage across requests
- Replaces manual goroutine management with
errgroupfor proper lifecycle handling and error propagation - Introduces context-aware copying to respect cancellation during data transfers
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
706ab62 to
340ae3b
Compare
15bca23 to
4024987
Compare
|
@hsiangkao @henry118 @djdongjin @fuweid can I get another review round on this?🙏 Updated — switched to errgroup, added context-aware copy, fixed buffer pool reset. |
4024987 to
bea67d2
Compare
henry118
left a comment
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.
LGTM. Thanks
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
bea67d2 to
e69a33a
Compare
this: