-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(NODE-6231): Add CSOT behaviour for retryable reads and writes #4186
Conversation
timeoutContext.serverSelectionTimeout?.clear(); | ||
timeoutContext.connectionCheckoutTimeout?.clear(); |
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.
clear timeouts to ensure correct setting of the serverSelectionTimeoutMS
value
@@ -39,6 +39,7 @@ export class Timeout extends Promise<never> { | |||
public ended: number | null = null; | |||
public duration: number; | |||
public timedOut = false; | |||
public cleared = false; |
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.
Add cleared flag that gets set on Timeout.clear
so that the TimeoutContext can know if it needs to reconstruct a Timeout for retrying operations
'timeoutMS applies to whole operation, not individual attempts - bulkWrite on collection', | ||
'timeoutMS applies to whole operation, not individual attempts - insertMany on collection' |
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.
Skipped for now. We seem to be throwing the TimeoutError at the correct place, but it's getting wrapped by the BulkWriteError
Description
What is changing?
Timeout
to havecleared
flagCSOTTimeoutContext
to correctly setserverSelectionTimeoutMS
when retrying commandsIs there new documentation needed for these changes?
No - punting to CSOT release
What is the motivation for this change?
NODE-6231
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript