-
Notifications
You must be signed in to change notification settings - Fork 10
DOCSP-41122: Choose a Connection Target #33
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
DOCSP-41122: Choose a Connection Target #33
Conversation
✅ Deploy Preview for docs-kotlin-sync ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
good work, have a question about the code example
|
||
When you connect to Atlas, we recommend using the {+stable-api+} client option to avoid | ||
breaking changes when Atlas upgrades to a new version of {+mdb-server+}. | ||
To learn more about the {+stable-api+} feature, see :ref:`<kotlin-sync-stable-api>`. |
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.
To learn more about the {+stable-api+} feature, see :ref:`<kotlin-sync-stable-api>`. | |
To learn more about the {+stable-api+} feature, see the :ref:`<kotlin-sync-stable-api>` guide. |
- Specify ``false`` as the value of the ``directConnection`` parameter. | ||
- Specify more than one host in the replica set. | ||
|
||
The following examples show how to specify multiple hosts to a ``MongoClient`` instance |
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.
Q: I'm a little confused about this example: Is specifying multiple hosts the same as connecting to a replica set? IT seems like this is related to performing automatic discovery, so if that's the intention then I would clarify that in the copy about "the following examples..."
Also, looking at the docs you modeled off, the PyMongo docs at least have an example that is like:
" the driver uses a sample connection URI to connect to the MongoDB replica set sampleRS, which is running on port 27017 of three different hosts, including host1:"
You could also consider changing the example to more match PyMongo, which directly connects to a replica set.
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.
I can update the copy introducing the example to more closely resemble the PyMongo example – I believe that you're correct in that it relates to point 3 in the automatic discovery list.
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.
LGTM!
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.
Some minor nits / comments
Then, pass your connection string to the ``MongoClient`` constructor. | ||
|
||
.. tip:: | ||
|
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.
nit: tck param looks wrong (admittedly I dont know what it actually does 😁)
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.
Can you elaborate on what looks wrong? Unsure on what you're referring to.
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.
Apologies: Atlas driver connection guide </driver-connection?tck=docs_driver_python>
Specifically: docs_driver_python
. If its all good then LGTM :)
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.
Ah, yes, I can remove that. Good eye!
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.
Already approved before but LGTM!
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.
Looks good just double checking the link to the "Atlas driver connection guide".
Then, pass your connection string to the ``MongoClient`` constructor. | ||
|
||
.. tip:: | ||
|
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.
Apologies: Atlas driver connection guide </driver-connection?tck=docs_driver_python>
Specifically: docs_driver_python
. If its all good then LGTM :)
(cherry picked from commit 89f8076)
(cherry picked from commit 89f8076)
Adapted from Pymongo and Kotlin Coroutine.
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-41122
Staging - https://preview-mongodbmcmorisi.gatsbyjs.io/kotlin-sync/DOCSP-41122-connection-targets/connect/connection-targets/
Self-Review Checklist