-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Use Case
As a... Node.js driver user
I want... MongoClient.connect() to throw regardless of configuration if the host does not exist
So that... I can rely on the error to inform my application of the incorrect configuration
User Experience
- What is the desired/expected outcome for the user once this ticket is implemented?
- The MongoClient.connect function reliably identifies if a host is unable to be connected to
Dependencies
- Compass & Data Explorer connection latency improvements
Risks/Unknowns
- What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
- It is a change in behavior, auth-less use is going to run a checkOut when it didn't previously, but now that we've removed "ping" already we will only be running a handshake and populating the pool by 1 so the next operation can use the work done in that step.
- Additionally, the __skipPingOnConnect flag is still used to bypass the checkOut when we're calling connect for a command (auto-connect) so we don't perform a double checkout.
- Is there an opportunity for better cross-driver alignment or testing in this area?
- connect is specific to Node
- Is there an opportunity to improve existing documentation on this subject?
- The connect method should clarify what it represents to succeed or fail in ts-doc
Acceptance Criteria
Implementation Requirements
- Remove the requirement for credentials to run the checkOut "test" for connectivity
- Move the server selection step into the __skipPingOnConnect condition so we don't perform a server selection when auto-connecting (since we will server select for the command)
Testing Requirements
- Verify LB=true and noauth throws if the host does not exist
- Note: we don't need the topology for this since it is a failure case
- Check that server selection is not doubled for auto-connect
Documentation Requirements
- API Docs on connect
Follow Up Requirements
- None
- if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward
- related to
-
NODE-7020 Remove Ping on Client Connect
-
- Closed
-