Skip to content

Commit 945a6c2

Browse files
jmd-mongoandf-mongodb
authored andcommitted
DOCS-14180 replica sets should use setDefaultRWConcern to modify default write concern
1 parent 35916d3 commit 945a6c2

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

source/core/replica-set-write-concern.txt

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,8 @@ documentation on write concern, see :ref:`write-concern`.
110110
Modify Default Write Concern
111111
----------------------------
112112

113-
.. TODO need to remove most of this section and rewrite what's left.
114-
Post 2.6 though.
115-
116-
You can modify the default write concern for a replica set by setting
117-
the :rsconf:`settings.getLastErrorDefaults` setting
118-
in the :doc:`replica set configuration
119-
</reference/replica-configuration>`. The following sequence of commands
120-
creates a configuration that waits for the write operation to complete
121-
on a majority of the voting members before returning:
122-
123-
.. code-block:: javascript
124-
125-
cfg = rs.conf()
126-
cfg.settings.getLastErrorDefaults = { w: "majority", wtimeout: 5000 }
127-
rs.reconfig(cfg)
113+
You can modify the default write concern for a replica set by issuing
114+
the :dbcommand:`setDefaultRWConcern` command.
128115

129116
If you issue a write operation with a specific write concern, the write
130117
operation uses its own write concern instead of the default.

0 commit comments

Comments
 (0)