-
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
docs(NODE-6223): timeoutMS does not govern auto-connect #4280
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Happy to take the tests out or adjust them, they were left over from when I started to implement connect timeout. |
aditi-khare-mongoDB
requested changes
Oct 16, 2024
nbbeeken
added
the
Primary Review
In Review with primary reviewer, not yet ready for team's eyes
label
Oct 16, 2024
aditi-khare-mongoDB
approved these changes
Oct 16, 2024
aditi-khare-mongoDB
added
Team Review
Needs review from team
and removed
Primary Review
In Review with primary reviewer, not yet ready for team's eyes
labels
Oct 16, 2024
dariakp
requested changes
Oct 17, 2024
baileympearson
requested changes
Oct 17, 2024
baileympearson
force-pushed
the
NODE-6090
branch
from
October 21, 2024 15:09
d224fff
to
c3f31da
Compare
nbbeeken
force-pushed
the
NODE-6223-csot-connect
branch
from
October 21, 2024 15:20
f6d9148
to
69f042e
Compare
baileympearson
force-pushed
the
NODE-6090
branch
from
October 21, 2024 20:52
c3f31da
to
4fd4b24
Compare
Co-authored-by: Aditi Khare <[email protected]>
Co-authored-by: Daria Pardue <[email protected]>
nbbeeken
force-pushed
the
NODE-6223-csot-connect
branch
from
October 22, 2024 17:34
69f042e
to
f38430b
Compare
baileympearson
approved these changes
Oct 23, 2024
nbbeeken
added a commit
that referenced
this pull request
Nov 1, 2024
Co-authored-by: Aditi Khare <[email protected]> Co-authored-by: Daria Pardue <[email protected]>
nbbeeken
added a commit
that referenced
this pull request
Nov 5, 2024
Co-authored-by: Aditi Khare <[email protected]> Co-authored-by: Daria Pardue <[email protected]>
dariakp
added a commit
that referenced
this pull request
Nov 6, 2024
Co-authored-by: Aditi Khare <[email protected]> Co-authored-by: Daria Pardue <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
What is changing?
Added docs
Is there new documentation needed for these changes?
New docs for docs? interesting idea
What is the motivation for this change?
Auto connect or plain connect performs file system access, DNS lookup, monitor creation, mongocryptd launching, and more! each one of these steps has its own mechanism for cancellation that is not considered by the CSOT spec. Alternatively we considered ignoring cancelling those operations and simply racing with a timeout, however, the impact could be squashing important errors.
Auto connect needs a future rework to better align with the drivers "always connected" perspective, for now, its best to explicitly connect if there's concern that the connecting operation won't complete in a globally set timeoutMS value.
Q&A
Is there anything that the user can set that will bound the execution time of autoconnect in this case?
Nothing specific to auto-connect, any client options:
socketTimeoutMS
,waitQueueTimeoutMS
,serverSelectionTimeoutMS
,connectTimeoutMS
are all general options that control those components of the driver for all operations. Auto-connect or just connect itself has its own set of operations that cannot be timed out at all, reading TLS files, SRV/TXT DNS lookup, monitoring start-up, server selection, and a ping. Also, auto-encryption can have an internal client that repeats the aforementioned as well.Generally, folks observe a
MongoServerSelectionError
when the ping forces a server selection that the monitors fail to service in time. That cannot be set for only connect and only covers a common case.Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript