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
Stop treating context errors as network errors where possible. #1045
Stop treating context errors as network errors where possible. #1045
Conversation
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.
Nicely done. This is tricky.
Aside: Is there a standard term to describe when a https://pkg.go.dev/context describes:
|
@kevinAlbs great question. I should not have used the term "context expiration". |
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 good 👍
You may want to add one of the GODRIVER tickets to the PR title to get the Jira integration (will make the next patch release easier because a ticket will have the automated commit messages).
@matthewdale was planning on putting the ticket names in the body of the commit message as outlined in the onboarding doc. Jira should still pick them up. |
mongodb#1045)" This reverts commit e720278.
…possible. (mongodb#1045)"" This reverts commit 47fb133.
GODRIVER-2468
GODRIVER-1965
Stops returning a network error when minimum RTT exceeds time remaining until deadline. Stops checking for context expiration in
writeWireMessage
andreadWireMessage
; removes associated tests. Stops checking for context expiration inWithTransaction
. Starts checking for any context error before runningroundTrip
inExecute
(including cancelation). Adds tests to ensure thatExecute
does not mark done contexts with theTransientTransactionError
label.Network errors can be marked with the
TransientTransactionError
label here, and can therefore be retryable. Context errors do not represent retryable scenarios, so we should stop callingnetworkError()
on context errors where possible. Once we stop treating context errors as retryable, we no longer need to check explicitly for them inWithTransaction
.