Skip to content

Commit 2b92f8f

Browse files
authored
DOCS-5341 Clarify Replica Set Write Concern when w > 1 (#2620) (#2645)
* DOCS-5341 Clarify Replica Set Write Concern when w > 1 * JA edits + try reformatting * adjust bullets * AK edits + JA nit * AK edits: more accurate language + clarify note on data-bearing members * formatting * typo fix
1 parent 98ed766 commit 2b92f8f

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

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

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,22 @@ operation returns as successful. A member can only acknowledge a
1717
write operation after it has received and applied the write
1818
successfully.
1919

20-
For replica sets, the default write concern of
21-
:writeconcern:`w: 1 </<number/>>` requires that only the primary
22-
replica set member acknowledge the write before returning
23-
write concern acknowledgment. You can specify an integer
24-
value greater than ``1`` to require acknowledgment from the primary and
25-
as many secondaries as needed to meet the specified value, up to the
26-
total number of data-bearing members in the replica set.
27-
28-
Write operations with a write concern of :writeconcern:`"majority"`
29-
require acknowledgement that the write operations have propagated to a
30-
:ref:`calculated majority <calculating-majority-count>` of the
31-
data-bearing voting members. For clusters where members have :ref:`journaling
32-
<journaling-internals>` enabled, combining ``"majority"`` write concern
33-
with :writeconcern:`j : true <j>` can prevent :ref:`rollback
34-
<replica-set-rollbacks>` of write concern acknowledged data.
20+
For replica sets:
21+
22+
- The default write concern of :writeconcern:`w: 1 <\<number\>>` only requires
23+
acknowledgment from the primary replica set member before returning
24+
write concern acknowledgment.
25+
26+
- A write concern with a numeric value greater than ``1`` requires
27+
acknowledgment from the primary and as many secondaries as needed to meet the
28+
specified value. The secondaries do not need to be voting members to meet the
29+
write concern threshold. The specified write concern value cannot be greater
30+
than the total number of data-bearing members in the replica set.
31+
32+
- A write concern of :writeconcern:`w: "majority" <"majority">` requires
33+
acknowledgement that the write operations have been durably committed to a
34+
:ref:`calculated majority <calculating-majority-count>` of the data-bearing
35+
voting members.
3536

3637
For complete documentation on write acknowledgment
3738
behavior, see :ref:`wc-ack-behavior`.

source/reference/write-concern.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,13 @@ available:
9898

9999
``w`` greater than 1 requires acknowledgment from the primary
100100
and as many data-bearing secondaries as needed to meet the
101-
specified write concern. For example, consider a 3-member
102-
replica set with a primary and 2 secondaries. Specifying ``w:
103-
2`` would require acknowledgment from the primary and one of the
104-
secondaries. Specifying ``w: 3`` would require acknowledgment
105-
from the primary and both secondaries.
101+
specified write concern. The secondaries do not need to be
102+
voting members to meet the write concern threshold.
103+
104+
For example, consider a 3-member replica set with a primary and 2
105+
secondaries. Specifying ``w: 2`` would require acknowledgment from the
106+
primary and one of the secondaries. Specifying ``w: 3`` would require
107+
acknowledgment from the primary and both secondaries.
106108

107109
.. note::
108110

@@ -120,9 +122,9 @@ available:
120122

121123
* - .. writeconcern:: "majority"
122124

123-
- Requests acknowledgment that write operations have propagated to
124-
the :ref:`calculated majority <calculating-majority-count>` of the
125-
data-bearing voting members (i.e. primary and secondaries with
125+
- Requests acknowledgment that write operations have been durably committed
126+
to the :ref:`calculated majority <calculating-majority-count>` of the
127+
data-bearing voting members (i.e. primary and secondaries with
126128
:rsconf:`members[n].votes` greater than ``0``).
127129

128130
For example, consider a replica set with 3 voting members,

0 commit comments

Comments
 (0)