Skip to content

Commit a5427d0

Browse files
committed
Revert "DOCS-14180 replica sets should use setDefaultRWConcern to modify default write concern"
This reverts commit 7564c3b.
1 parent 7564c3b commit a5427d0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

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

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

113-
You can modify the default write concern for a replica set by issuing
114-
the :dbcommand:`setDefaultRWConcern` command.
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)
115128

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

0 commit comments

Comments
 (0)