Skip to content

Commit b734576

Browse files
author
Dave
authored
DOCSP-21096 retryable writes v5.3 (#767)
* DOCSP-21096 Retryale writes enabled by default * Staging fixes * Staging updates * Staging updates * Staging updates * Review updates
1 parent df74b86 commit b734576

File tree

2 files changed

+32
-24
lines changed

2 files changed

+32
-24
lines changed

source/core/retryable-writes.txt

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ Retryable Writes
1212
:depth: 1
1313
:class: singlecol
1414

15-
.. versionadded:: 3.6
16-
1715
Retryable writes allow MongoDB drivers to automatically retry certain
1816
write operations a single time if they encounter network errors, or if
19-
they cannot find a healthy :term:`primary` in the
20-
:ref:`replica sets <replication>` or :ref:`sharded cluster
21-
<sharding-introduction>`. [#duplicate-key-update]_
17+
they cannot find a healthy :term:`primary` in the :ref:`replica set
18+
<replication>` or :ref:`sharded cluster <sharding-introduction>`.
19+
[#duplicate-key-update]_
2220

2321
Prerequisites
2422
-------------
@@ -74,12 +72,23 @@ MongoDB Drivers
7472
.. include:: /includes/extracts/4.2-changes-drivers-retryWrites-default.rst
7573

7674
:binary:`~bin.mongosh`
77-
To enable retryable writes in :binary:`~bin.mongosh`, use
78-
the :option:`--retryWrites <mongosh --retryWrites>` command line option:
75+
Retryable writes are enabled by default in :binary:`~bin.mongosh`. To
76+
disable retryable writes, use the :option:`--retryWrites=false
77+
<mongosh --retryWrites>` command line option:
78+
79+
.. code-block:: bash
80+
81+
mongosh --retryWrites=false
82+
83+
:binary:`~bin.mongo`
84+
Retryable writes are disabled by default in the legacy
85+
:binary:`~bin.mongo` shell. To enable retryable writes, use the
86+
:option:`--retryWrites=true <mongosh --retryWrites>` command line
87+
option:
7988

8089
.. code-block:: bash
8190

82-
mongosh --retryWrites
91+
mongo --retryWrites=true
8392

8493
.. _retryable-write-ops:
8594

source/includes/extracts-4.2-changes.yaml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -725,22 +725,21 @@ content: |
725725
---
726726
ref: 4.2-changes-drivers-retryWrites-default
727727
content: |
728-
MongoDB 3.6 introduced support for :ref:`retryable-writes`, but most
729-
official MongoDB 3.6 and 4.0-compatible drivers disabled this feature
730-
by default. For such drivers, retryable writes could be enabled per
731-
connection by including the :urioption:`retryWrites=true
732-
<retryWrites>` option in the :ref:`connection string <mongodb-uri>`
733-
for that connection. Refer to the `MongoDB Driver Documentation
734-
<https://docs.mongodb.com/drivers/?tck=docs_server>`_ to determine
735-
the correct default state of :urioption:`retryWrites` for your
736-
specific driver and version.
737-
738-
The official MongoDB 4.2+ compatible drivers enable :ref:`retryable-writes` by
739-
default. Applications upgrading to the 4.2+ compatible drivers that require
740-
retryable writes may omit the :urioption:`retryWrites=true <retryWrites>`
741-
option. Applications upgrading to the 4.2+ compatible drivers that require
742-
*disabling* retryable writes must include
743-
:urioption:`retryWrites=false <retryWrites>` in the connection string.
728+
729+
Drivers compatible with MongoDB 4.2 and higher enable
730+
:ref:`retryable-writes` by default. Earlier drivers require the
731+
:urioption:`retryWrites=true <retryWrites>` option. The
732+
:urioption:`retryWrites=true <retryWrites>` option can be omitted in
733+
applications that use drivers compatible with MongoDB 4.2 and
734+
higher.
735+
736+
|
737+
738+
To disable retryable writes, applications that use drivers
739+
compatible with MongoDB 4.2 and higher must include
740+
:urioption:`retryWrites=false <retryWrites>` in the connection
741+
string.
742+
744743
---
745744
ref: 4.2-changes-libldap
746745
content: |

0 commit comments

Comments
 (0)