client: fix upload timeouts with sock_read set (#7150)#7206
Conversation
Prevent the `sock_read` timeout callback from firing by only scheduling it afterthe payload (if any) has been fully written. No Fixes #7149 - [x] I think the code is well written - [x] Unit tests for the changes exist - [x] Documentation reflects the changes - [x] If you provide code modification, please add yourself to `CONTRIBUTORS.txt` * The format is <Name> <Surname>. * Please keep alphabetical order, the file is sorted by names. - [x] Add a new news fragment into the `CHANGES` folder * name it `<issue_id>.<type>` for example (588.bugfix) * if you don't have an `issue_id` change it to the pr id after creating the pr * ensure type is one of the following: * `.feature`: Signifying a new feature. * `.bugfix`: Signifying a bug fix. * `.doc`: Signifying a documentation improvement. * `.removal`: Signifying a deprecation or removal of public API. * `.misc`: A ticket has been closed, but it is not of interest to users. * Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files." --------- Co-authored-by: Sam Bull <[email protected]> (cherry picked from commit fecbe99)
Codecov Report
@@ Coverage Diff @@
## 3.9 #7206 +/- ##
=======================================
Coverage 97.35% 97.36%
=======================================
Files 107 107
Lines 31276 31297 +21
Branches 3963 3964 +1
=======================================
+ Hits 30449 30472 +23
+ Misses 621 620 -1
+ Partials 206 205 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@Dreamsorcerer, is there any reason not to backport this in 3.8? We'd love to see this released, as it's breaking chunking uploads of large files for us. Happy to create backport PR. 🙂 |
|
Firstly, it changes the behaviour in a significant enough way, that'd I'm not too comfortable including in a bug release (and would like to avoid doing another 3.8 release at this point). Secondly, we'd ideally get a write timeout parameter included before this is released (#7150 (comment)), otherwise there is potential here for a connection to never timeout. |
Prevent the
sock_readtimeout callback from firing by only scheduling it afterthe payload (if any) has been fully written.No
Fixes #7149
CONTRIBUTORS.txtCHANGESfolder<issue_id>.<type>for example (588.bugfix)issue_idchange it to the pr id after creating the pr.feature: Signifying a new feature. *.bugfix: Signifying a bug fix. *.doc: Signifying a documentation improvement. *.removal: Signifying a deprecation or removal of public API..misc: A ticket has been closed, but it is not of interest to users.Co-authored-by: Sam Bull [email protected]
(cherry picked from commit fecbe99)
What do these changes do?
Are there changes in behavior for the user?
Related issue number
Checklist
CONTRIBUTORS.txtCHANGESfolder<issue_id>.<type>for example (588.bugfix)issue_idchange it to the pr id after creating the pr.feature: Signifying a new feature..bugfix: Signifying a bug fix..doc: Signifying a documentation improvement..removal: Signifying a deprecation or removal of public API..misc: A ticket has been closed, but it is not of interest to users.