-
Notifications
You must be signed in to change notification settings - Fork 10
DOCSP-51889-retryable-reads-and-writes #126
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
shuangela
merged 2 commits into
mongodb:comp-cov
from
shuangela:DOCSP-51889-retryable-reads-and-writes
Jul 28, 2025
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -307,24 +307,60 @@ tab to see corresponding code for each approach: | |||||
:tabid: settings | ||||||
|
||||||
.. literalinclude:: /includes/configure-crud.kt | ||||||
:language: rust | ||||||
:language: kotlin | ||||||
:dedent: | ||||||
:start-after: start-local-threshold-settings | ||||||
:end-before: end-local-threshold-settings | ||||||
|
||||||
|
||||||
.. tab:: Connection URI | ||||||
:tabid: uri | ||||||
|
||||||
.. literalinclude:: /includes/configure-crud.kt | ||||||
:language: rust | ||||||
:language: kotlin | ||||||
:dedent: | ||||||
:start-after: start-local-threshold-uri | ||||||
:end-before: end-local-threshold-uri | ||||||
|
||||||
In the preceding example, the {+driver-short+} distributes reads among matching members | ||||||
within 35 milliseconds of the closest member's ping time. | ||||||
|
||||||
Retryable Reads and Writes | ||||||
-------------------------- | ||||||
|
||||||
{+driver-short+} automatically retries certain read and write operations a single time | ||||||
if they fail due to a network or server error. | ||||||
|
||||||
You can explicitly disable retryable reads or retryable writes by setting the ``retryReads`` or | ||||||
``retryWrites`` option to ``False`` in a ``MongoClientSettings`` instance. You can also | ||||||
set the ``retryReads`` or ``retryWrites`` options in your connection URI. | ||||||
|
||||||
The following example sets both retryable reads and retryable writes to ``False``. Select the :guilabel:`MongoClientSettings` or :guilabel:`Connection URI` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
suggestion: B/c it is lowercase in code |
||||||
tab to see corresponding code for each approach: | ||||||
|
||||||
.. tabs:: | ||||||
|
||||||
.. tab:: MongoClientSettings | ||||||
:tabid: settings | ||||||
|
||||||
.. literalinclude:: /includes/configure-crud.kt | ||||||
:language: kotlin | ||||||
:dedent: | ||||||
:start-after: start-retryable-reads-writes | ||||||
:end-before: end-retryable-reads-writes | ||||||
|
||||||
.. tab:: Connection URI | ||||||
:tabid: uri | ||||||
|
||||||
.. literalinclude:: /includes/configure-crud.kt | ||||||
:language: kotlin | ||||||
:dedent: | ||||||
:start-after: start-retryable-reads-writes-uri | ||||||
:end-before: end-retryable-reads-writes-uri | ||||||
|
||||||
To learn more about supported retryable read operations, see :manual:`Retryable Reads </core/retryable-reads/>` | ||||||
in the {+mdb-server+} manual. To learn more about supported retryable write | ||||||
operations, see :manual:`Retryable Writes </core/retryable-writes/>` in the {+mdb-server+} manual. | ||||||
|
||||||
API Documentation | ||||||
----------------- | ||||||
|
||||||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.