Skip to content

Commit b485bc2

Browse files
(DOCSP-18316): Change implicit write concern example
1 parent 611f93e commit b485bc2

File tree

2 files changed

+42
-29
lines changed

2 files changed

+42
-29
lines changed

source/includes/5.0-default-wc.rst

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
Starting in MongoDB 5.0, the implicit default write concern is
1+
Starting in MongoDB 5.0, the implicit default
2+
:ref:`write concern <write-concern>` is
23
:writeconcern:`w: majority <"majority">`. However, special
3-
considerations are made for deployments containing :ref:`arbiters
4-
<replica-set-arbiter-configuration>`:
4+
considerations are made for deployments containing
5+
:ref:`arbiters <replica-set-arbiter-configuration>`:
56

67
- The voting majority of a replica set is 1 plus half the number of
78
voting members, rounded down. If the number of data-bearing voting
@@ -34,10 +35,10 @@ default write concerns:
3435
- Majority of Voting Nodes
3536
- Implicit Default Write Concern
3637

37-
* - 3
38+
* - 2
3839
- 1
39-
- 4
4040
- 3
41+
- 2
4142
- ``{ w: 1 }``
4243

4344
* - 4
@@ -46,14 +47,26 @@ default write concerns:
4647
- 3
4748
- ``{ w: "majority" }``
4849

49-
- The first example has 3 non-arbiters and 1 arbiter for a total of 4
50-
voting nodes. The majority of voting nodes (1 plus half of 4) is 3.
51-
The number of non-arbiters (3) is less than or equal to the majority
52-
of voting nodes, resulting in an implicit write concern of
53-
``{ w: 1 }``.
50+
- In the first example:
5451

55-
- The second example has 4 non-arbiters and 1 arbiter for a total of 5
56-
voting nodes. The majority of voting nodes (1 plus half of 5, rounded
57-
down) is 3. The number of non-arbiters (4) is greater than the majority
58-
of voting nodes, resulting in an implicit write concern of ``{ w:
59-
"majority" }``.
52+
- There are 2 non-arbiters and 1 arbiter for a total of 3 voting
53+
nodes.
54+
55+
- The majority of voting nodes (1 plus half of 3, rounded
56+
down) is 2.
57+
58+
- The number of non-arbiters (2) is equal to
59+
the majority of voting nodes (2), resulting in an implicit write
60+
concern of ``{ w: 1 }``.
61+
62+
- In the second example:
63+
64+
- There are 4 non-arbiters and 1 arbiter for a total of 5
65+
voting nodes.
66+
67+
- The majority of voting nodes (1 plus half of 5, rounded
68+
down) is 3.
69+
70+
- The number of non-arbiters (4) is greater than the majority
71+
of voting nodes (3), resulting in an implicit write concern of
72+
``{ w: "majority" }``.

source/release-notes/5.0.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -667,20 +667,20 @@ Implicit Default Write Concern
667667

668668
.. include:: /includes/5.0-default-wc.rst
669669

670-
The ``{ w: "majority" }`` default :doc:`write concern
671-
</reference/write-concern>` provides a stronger durability guarantee in
672-
the event of an election, or if replica set members become unavailable.
673-
674-
The :writeconcern:`w: majority <"majority">` write concern may impact
675-
performance since writes will only be acknowledged once a
676-
:ref:`calculated majority <calculating-majority-count>` of replica set
677-
members have executed and persisted the write to disk.
678-
679-
If your application relies on performance-sensitive writes, you can use
680-
the :dbcommand:`setDefaultRWConcern` command to explicitly set the
681-
default write concern for improved performance at the cost of data
682-
durability guarantees. You can also set the write concern at the
683-
individual operation level for performance-critical writes. See your
670+
The :writeconcern:`{ w: "majority" } <"majority">` default
671+
:doc:`write concern </reference/write-concern>` provides a stronger
672+
durability guarantee in the event of an election, or if replica set
673+
members become unavailable.
674+
675+
The :writeconcern:`{ w: "majority" } <"majority">` write concern may
676+
impact performance since writes will only be acknowledged once a
677+
:ref:`calculated majority <calculating-majority-count>` of replica set
678+
members have executed and persisted the write to disk. If your
679+
application relies on performance-sensitive writes, you can use the
680+
:dbcommand:`setDefaultRWConcern` command to explicitly set the default
681+
write concern for improved performance at the cost of data durability
682+
guarantees. You can also set the write concern at the individual
683+
operation level for performance-critical writes. See your
684684
:driver:`driver documentation </>` for details.
685685

686686
``mongosShutdownTimeoutMillisForSignaledShutdown`` Parameter

0 commit comments

Comments
 (0)