-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
How are you using Mongo? What version of the server and driver are you using?
Using the driver to perform operations against a server.
What is the feature/improvement you would like?
I want the first operation run on a client to perform connect automatically if it hasn't been done already. Internally we should use the flag that disables the initial ping since authentication failures (the sole reason for the ping) will be surfaced by the operation that is being attempted.
What use case would this feature/improvement enable?
You could construct and immediately use a mongo client without calling connect.
Acceptance Criteria
- Make MongoClient accessible inside execute operation to call connect.
- Review tests and update any that explicitly call MongoClient connect.
- File a separate PR for this.
- Add an explicit test for MongoClient connect behavior
- Add a regression test to make sure we can successfully execute an operation after calling connect first explicitly.
- Add a test to make sure that we can call an operation without calling connect first explicitly.
- If an error occurs in connect, ensure the error is handled and passed to the user. Ex. if we have a server selection timeout when you run a find.
- Mark DOCS needed and remove explicit connect from the operations examples.
- is related to
-
NODE-4264 Remove connect usage from tests
- Closed