-
Notifications
You must be signed in to change notification settings - Fork 9
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
Client error propagation #86
Client error propagation #86
Conversation
0f12ac8
to
d24c9fc
Compare
/assign @PrasadG193 |
1954211
to
fa2884c
Compare
1d0baba
to
b605c85
Compare
051fe84
to
4e99c01
Compare
// Create a timeout context so that failure in either sending to the client or | ||
// receiving from the CSI driver will ultimately abort the handler session. | ||
// The context could also get canceled by the client. | ||
ctx, cancelFn := context.WithTimeout(s.getMetadataAllocatedContextWithLogger(req, stream), s.config.MaxStreamDur) |
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.
just to confirm, this timeout will be applicable for take taken for complete data transfer not just a page (maxResults), right?
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.
Yes, that is correct - it will span multiple pages.
4e99c01
to
b28723c
Compare
b28723c
to
29b0c54
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carlbraganza, PrasadG193 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Ensure that client errors (context cancellation or failure to read responses) will result in the CSI driver stream being canceled.
What type of PR is this?
What this PR does / why we need it:
This ensures that when a client aborts its receive stream, or stops reading responses, or the network connection between the client and the sidecar fails, the CSI driver stream will get canceled.
Which issue(s) this PR fixes:
Fixes #66
Special notes for your reviewer:
Does this PR introduce a user-facing change?: