-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Connection Layer, Performance
Use Case
As a... Devtools developer
I want... to be able to create a MongoClient and start monitoring without running a command
So that... I can have a client with a connection pool that is "running"
User Experience
- What is the desired/expected outcome for the user once this ticket is implemented?
- MongoClient#connect() no longer sends a ping command.
Dependencies
- COMPASS-9455 - reducing connect latency
Risks/Unknowns
- What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
- Is there an opportunity for better cross-driver alignment or testing in this area?
- Is there an opportunity to improve existing documentation on this subject?
Acceptance Criteria
Implementation Requirements
- Change Topology#connect() to not execute a ping, rather check out a connection from the pool and check it back in.
- Add timeoutMS and serverSelectionTimeoutMS as options to connect() (Default both to 30 seconds)
- Pass a timeout context to pool.checkOut();
- Ensure the CMAP events are not triggered for the initial check in/out
Testing Requirements
- unit test, spec test sync, etc
Documentation Requirements
- DOCSP ticket, API docs, etc
Follow Up Requirements
- additional tickets to file, required releases, etc
- 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
- is related to
-
NODE-6905 Spike: Add driver configuration that allows driver to connect to a server without SDAM
-
- Backlog
-
- related to
-
COMPASS-9455 Avoid running ping on initial connection to cluster in compass
-
- Backlog
-