Skip to content

Conversation

mcmorisi
Copy link
Collaborator

@mcmorisi mcmorisi commented Aug 8, 2024

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

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for docs-kotlin-sync ready!

Name Link
🔨 Latest commit 5eb0529
🔍 Latest deploy log https://app.netlify.com/sites/docs-kotlin-sync/deploys/66bb5e6df2b44200080f0c3b
😎 Deploy Preview https://deploy-preview-33--docs-kotlin-sync.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@shuangela shuangela left a 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>`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Collaborator

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.

Copy link
Collaborator Author

@mcmorisi mcmorisi Aug 8, 2024

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.

@mcmorisi mcmorisi requested a review from shuangela August 8, 2024 17:55
Copy link
Collaborator

@shuangela shuangela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mcmorisi mcmorisi requested review from shuangela, a team and rozza and removed request for a team August 8, 2024 18:37
Copy link
Member

@rozza rozza left a 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::

Copy link
Member

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 😁)

Copy link
Collaborator Author

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.

Copy link
Member

@rozza rozza Aug 13, 2024

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 :)

Copy link
Collaborator Author

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!

@mcmorisi mcmorisi mentioned this pull request Aug 9, 2024
5 tasks
Copy link
Collaborator

@shuangela shuangela left a 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!

@mcmorisi mcmorisi requested a review from rozza August 9, 2024 18:31
Copy link
Member

@rozza rozza left a 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::

Copy link
Member

@rozza rozza Aug 13, 2024

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 :)

@mcmorisi mcmorisi merged commit 89f8076 into mongodb:master Aug 13, 2024
5 of 6 checks passed
@mcmorisi mcmorisi deleted the DOCSP-41122-connection-targets branch August 13, 2024 13:25
mcmorisi added a commit that referenced this pull request Aug 13, 2024
mcmorisi added a commit that referenced this pull request Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants