[GODRIVER-1965] Pre-write context expiration should not be considered a network error Created: 13/Apr/21 Updated: 28/Oct/23 Resolved: 17/Aug/22 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.10.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Divjot Arora (Inactive) | Assignee: | Benji Rewis (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Epic Link: | Client Side Operations Timeout | ||||||||||||
| Quarter: | FY23Q2, FY23Q3 | ||||||||||||
| Description |
|
The connection#writeWireMessage function does an optimistic check for context expiration and returns an error without writing to the socket because it knows the write will fail anyway. This is a good idea, but the error is considered a network timeout by the operations layer, which is incorrect. We should either remove this check altogether or move it into the Operation#Execute function and not call WriteWireMessage at all if the context is expired. |
| Comments |
| Comment by Githook User [ 06/Sep/22 ] |
|
Author: {'name': 'Benjamin Rewis', 'email': 'benji.rewis@mongodb.com', 'username': 'benjirewis'}Message: Stop treating context errors as network errors where possible. (#1045)
|
| Comment by Githook User [ 17/Aug/22 ] |
|
Author: {'name': 'Benjamin Rewis', 'email': '32186188+benjirewis@users.noreply.github.com', 'username': 'benjirewis'}Message: Stop treating context errors as network errors where possible. (#1045)
|
| Comment by Benji Rewis (Inactive) [ 10/Aug/22 ] |
|
I think we can remove the checks in both writeWireMessage and readWireMessage and rely on the short-circuiting check as long as we check for all context errors (including cancelation). https://github.com/mongodb/mongo-go-driver/pull/1045 |