Skip to content

PYTHON-3445 Improve documentation for custom readPreference tags #1068

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

Merged
merged 3 commits into from
Oct 7, 2022

Conversation

juliusgeo
Copy link
Contributor

No description provided.

@juliusgeo
Copy link
Contributor Author

This PR also addresses the link failures in PYTHON-3455

README.rst Outdated
@@ -25,7 +25,7 @@ For issues with, questions about, or feedback for PyMongo, please look into
our `support channels <https://support.mongodb.com/welcome>`_. Please
do not email any of the PyMongo developers directly with issues or
questions - you're more likely to get an answer on the `MongoDB Community
Forums <https://developer.mongodb.com/community/forums/tag/python-driver>`_.
Forums <https://www.`mongodb.com/community/forums/`tag/python>`_.
Copy link
Member

Choose a reason for hiding this comment

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

There are two stray backticks in the link


Nearest(tag_sets=[
{"node":"analytics"}
])
Copy link
Member

Choose a reason for hiding this comment

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

Make this one line like below: Nearest(tag_sets=[{"node":"analytics"}])

Can you also add a similar SecondaryPreferred example?

Nearest(tag_sets=[{"node":"analytics"}])

This can also be done using SecondaryPreferred to ensure that
the queries are sent to secondary nodes::
Copy link
Member

Choose a reason for hiding this comment

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

I worry "to ensure that the queries are sent to secondary nodes" is a little misleading since that's not the behavior of SecondaryPreferred, How about just:

        For example, to only send a query to an analytic node::

           Nearest(tag_sets=[{"node":"analytics"}])

        Or using :class:`SecondaryPreferred`::

           SecondaryPreferred(tag_sets=[{"node":"analytics"}])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SGTM

@juliusgeo juliusgeo requested a review from ShaneHarvey October 6, 2022 00:52
Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM!

@juliusgeo juliusgeo merged commit eaf0e6d into mongodb:master Oct 7, 2022
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