Skip to content

DOCS-6785: readConcern special cases #2480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions source/includes/apiargs-dbcommand-aggregate-field.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ description: |

.. include:: /includes/fact-enable-majority-readConcern.rst

To use the ``readConcern`` level of :readconcern:`"majority"`, you
cannot include the :pipeline:`$out` stage.
.. include:: /includes/fact-aggregate-readConcern.rst

.. versionadded:: 3.2

Expand Down
3 changes: 1 addition & 2 deletions source/includes/apiargs-dbcommand-count-field.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ description: |

.. include:: /includes/fact-enable-majority-readConcern.rst

To use the ``readConcern`` level of ``"majority"``, you must specify a
nonempty ``query`` condition.
.. include:: /includes/fact-count-readConcern.rst

.. versionadded:: 3.2
optional: true
Expand Down
2 changes: 2 additions & 0 deletions source/includes/fact-aggregate-readConcern.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
To use a :doc:`/reference/readConcern` level of :readconcern:`"majority"`, you
cannot include the :pipeline:`$out` stage.
2 changes: 2 additions & 0 deletions source/includes/fact-count-readConcern.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
To use a :doc:`/reference/readConcern` level of :readconcern:`"majority"`, you
must specify a nonempty ``query`` condition.
10 changes: 5 additions & 5 deletions source/includes/fact-enable-majority-readConcern.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
To use :doc:`/reference/readConcern` level of :readconcern:`"majority"`,
you must start the :program:`mongod` instances with
:option:`--enableMajorityReadConcern` command line option or, if using a
configuration file, the :setting:`replication.enableMajorityReadConcern`
setting.
To use a :doc:`/reference/readConcern` level of
:readconcern:`"majority"`, you must start the :program:`mongod`
instances with the :option:`--enableMajorityReadConcern` command line option
or, if using a configuration file, the
:setting:`replication.enableMajorityReadConcern` setting.
4 changes: 1 addition & 3 deletions source/reference/command/aggregate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,7 @@ majority of the nodes.

- .. include:: /includes/fact-enable-majority-readConcern.rst

- To use the ``readConcern`` level of :readconcern:`"majority"` with
:dbcommand:`aggregate`, you cannot include the :pipeline:`$out`
stage.
- .. include:: /includes/fact-aggregate-readConcern.rst

- .. include:: /includes/fact-readConcern-most-recent-data-in-node.rst

Expand Down
4 changes: 1 addition & 3 deletions source/reference/method/db.collection.aggregate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,7 @@ majority of the nodes.

- .. include:: /includes/fact-enable-majority-readConcern.rst

- To use the ``readConcern`` level of :readconcern:`"majority"` with
:method:`db.collection.aggregate()`, you cannot include the
:pipeline:`$out` stage.
- .. include:: /includes/fact-aggregate-readConcern.rst

- .. include:: /includes/fact-readConcern-most-recent-data-in-node.rst

Expand Down
7 changes: 7 additions & 0 deletions source/reference/method/db.collection.count.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ may off by up to 1000 documents as reported by :dbcommand:`collStats`,
statistics for the collection, run :dbcommand:`validate` on the
collection.

Count with Read Concern
~~~~~~~~~~~~~~~~~~~~~~~
A :doc:`/reference/readConcern` can be specified with the
:method:`cursor.readConcern()` method.

.. include:: /includes/fact-count-readConcern.rst

Examples
--------

Expand Down