Skip to content
Merged
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
9 changes: 7 additions & 2 deletions config/redirects
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ raw: /master/release-notes/3.0-general-improvements -> ${base}/release-notes/3.0
[*-v3.4]: /${version}/reference/operator/aggregation/currentOp -> ${base}/${version}/reference/command/currentOp/

# 2.8 compatibility
#

# [*]: /${version}/release-notes/2.8-downgrade -> ${base}/${version}/release-notes/
# [*]: /${version}/release-notes/2.8-compatibility -> ${base}/${version}/release-notes/
# [*]: /${version}/release-notes/2.8-changes -> ${base}/${version}/release-notes/
Expand Down Expand Up @@ -1799,9 +1799,14 @@ raw: /manual/core/wildcard -> ${base}/manual/core/index-wildcard/

[v5.0-*]: /${version}/reference/command/isMaster -> ${base}/${version}/reference/command/hello/
[v5.0-*]: /${version}/reference/method/db.isMaster -> ${base}/${version}/reference/method/db.hello/
[v5.0-*]: /${version}/reference/method/db.collection.copyTo.txt -> ${base}/${version}/reference/operator/aggregation/out/
[v5.0-*]: /${version}/reference/method/db.collection.save.txt -> ${base}/${version}/reference/method/db.collection.insertOne/
[v5.0-*]: /${version}/reference/method/db.eval -> ${base}/${version}/reference/method/js-database/
[v5.0-*]: /${version}/reference/method/db.getProfilingLevel -> ${base}/${version}/reference/method/db.getProfilingStatus/
[v5.0-*]: /${version}/reference/method/Mongo.isCausalConsistency -> ${base}/${version}/core/crud/
[v5.0-*]: /${version}/reference/method/Mongo.getSecondaryOk -> ${base}/${version}/reference/method/Mongo.getReadPrefMode/
[v5.0-*]: /${version}/reference/method/Mongo.isCausalConsistency -> ${base}/${version}/core/causal-consistency-read-write-concerns/
[v5.0-*]: /${version}/reference/method/Mongo.setSecondaryOk -> ${base}/${version}/reference/method/Mongo.setReadPref/
[v5.0-*]: /${version}/reference/method/rs.secondaryOk.txt -> ${base}/${version}/reference/replica-configuration/
[v5.0-*]: /${version}/mongo -> ${base}/${version}/reference/mongo/

#
Expand Down
11 changes: 5 additions & 6 deletions source/core/retryable-writes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ cannot be :writeconcern:`{w: 0} <\<number\>>`.
.. note::

The write operations inside the :doc:`transactions
</core/transactions>` are not individually retryable.
</core/transactions>` are not individually retryable.

.. list-table::
:header-rows: 1
Expand All @@ -109,7 +109,6 @@ cannot be :writeconcern:`{w: 0} <\<number\>>`.

* - | :method:`db.collection.updateOne()`
| :method:`db.collection.replaceOne()`
| :method:`db.collection.save()`
| :method:`db.collection.update()` where ``multi`` is ``false``

- Single-document update operations. [#duplicate-key-update]_
Expand Down Expand Up @@ -165,10 +164,10 @@ cannot be :writeconcern:`{w: 0} <\<number\>>`.
details, see :ref:`update-shard-key`.

.. [#duplicate-key-update]

MongoDB 4.2 will retry certain single-document upserts
(update with ``upsert: true`` and ``multi: false``) that encounter a
duplicate key exception. See :ref:`retryable-update-upsert` for
(update with ``upsert: true`` and ``multi: false``) that encounter a
duplicate key exception. See :ref:`retryable-update-upsert` for
conditions.

Prior to MongoDB 4.2, MongoDB would not retry upsert operations
Expand Down Expand Up @@ -207,7 +206,7 @@ the failover period exceeds :urioption:`serverSelectionTimeoutMS`.
Duplicate Key Errors on Upsert
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MongoDB 4.2 will retry single-document upsert operations
MongoDB 4.2 will retry single-document upsert operations
(i.e ``upsert : true`` and ``multi : false``) that
fail due to a duplicate key error *only if* the operation meets
*all* of the following conditions:
Expand Down
3 changes: 0 additions & 3 deletions source/core/transactions-operations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ operations against a :red:`non-existing` collection:

- :dbcommand:`insert`

* - :method:`db.collection.save()` results in an insert
-

* - | :method:`db.collection.updateOne()` with ``upsert: true``
| :method:`db.collection.updateMany()` with ``upsert: true``
| :method:`db.collection.replaceOne()` with ``upsert: true``
Expand Down
4 changes: 2 additions & 2 deletions source/includes/extracts-4.2-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -814,10 +814,10 @@ content: |
document. In earlier versions, these operations only attempt to
target using the replacement document.

- The :method:`~db.collection.save()` method is deprecated: use the
- The ``save()`` method is deprecated: use the
:method:`~db.collection.insertOne()` or
:method:`~db.collection.replaceOne()` method instead. The
:method:`~db.collection.save()` method cannot be used with
``save()`` method cannot be used with
sharded collections that are *not* sharded by ``_id``, and
attempting to do so will result in an error.

Expand Down
2 changes: 0 additions & 2 deletions source/includes/fact-getSecondaryOk.rst

This file was deleted.

4 changes: 2 additions & 2 deletions source/includes/fact-mongosh-callout.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
included in the
`MongoDB Server Download
<https://www.mongodb.com/try/download/community?tck=docs_server>`__.
For information on the new MongoDB Shell, ``mongosh``, refer to the
:mongosh:`mongosh Documentation </>`.
For information on the new MongoDB Shell (``mongosh``) refer to the
:mongosh:`mongosh documentation </>`.

To understand the differences between the two shells, see
:ref:`compare-mongosh-mongo`.
7 changes: 0 additions & 7 deletions source/includes/fact-secondaryOk.rst

This file was deleted.

2 changes: 0 additions & 2 deletions source/includes/fact-setSecondaryOk.rst

This file was deleted.

12 changes: 0 additions & 12 deletions source/includes/table-transactions-operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,6 @@

:ref:`transactions-operations-ddl`

* - :method:`db.collection.save()`
-
- Starting in MongoDB 4.4, if run on a non-existing
collection, the collection is implicitly created.

In MongoDB 4.2 and earlier, the operation must be run on an
existing collection.

.. seealso::

:ref:`transactions-operations-ddl`

* - | :method:`db.collection.updateOne()`
| :method:`db.collection.updateMany()`
| :method:`db.collection.replaceOne()`
Expand Down
4 changes: 2 additions & 2 deletions source/reference/command/convertToCapped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ Example
Convert a Collection
~~~~~~~~~~~~~~~~~~~~

The following example uses a :method:`db.collection.save()` operation to create
The following example uses :method:`db.collection.insertOne()` to create
an ``events`` collection, and :method:`db.collection.stats()` to obtain
information about the collection:

.. code-block:: javascript

db.events.save( { click: 'button-1', time: new Date() } )
db.events.insertOne( { click: 'button-1', time: new Date() } )
db.events.stats()

MongoDB will return the following:
Expand Down
2 changes: 0 additions & 2 deletions source/reference/insert-methods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ The following methods can also add new documents to a collection:
- :method:`db.collection.findOneAndReplace()` when used with the
``upsert: true`` option.

- :method:`db.collection.save()`.

- :method:`db.collection.bulkWrite()`.

See the individual reference pages for the methods for more information
Expand Down
49 changes: 1 addition & 48 deletions source/reference/method.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ Collection

- Provides bulk write operation functionality.

* - :method:`db.collection.copyTo()`

- Deprecated. Copies data between collections when run against MongoDB 4.0 or earlier. Unsupported when run against MongoDB 4.2 or later.

* - :method:`db.collection.count()`

- Wraps :dbcommand:`count` to return a count of the number of documents in a collection or a view.
Expand Down Expand Up @@ -177,10 +173,6 @@ Collection

- Replaces a single document in a collection.

* - :method:`db.collection.save()`

- Provides a wrapper around an :method:`~db.collection.insert()` and :method:`~db.collection.update()` to insert new documents.

* - :method:`db.collection.stats()`

- Reports on the state of a collection. Provides a wrapper around the :dbcommand:`collStats`.
Expand Down Expand Up @@ -570,9 +562,7 @@ Database

- Opens a :ref:`change stream cursor <changeStreams>` for a database
to report on all its non-``system`` collections. Cannot be opened on
the ``admin``, ``local`` or ``config`` databases.


the ``admin``, ``local`` or ``config`` databases.

.. toctree::
:titlesonly:
Expand All @@ -596,28 +586,24 @@ Query Plan Cache
- Returns an interface to access the query plan cache object and
associated PlanCache methods for a collection.


* - :method:`PlanCache.clear()`

- Clears all the cached query plans for a collection.
Accessible through the plan cache object of a specific collection,
i.e. ``db.collection.getPlanCache().clear()``.


* - :method:`PlanCache.clearPlansByQuery()`

- Clears the cached query plans for the specified query shape.
Accessible through the plan cache object of a specific collection,
i.e. ``db.collection.getPlanCache().clearPlansByQuery()``


* - :method:`PlanCache.help()`

- Displays the methods available for a collection's query plan cache.
Accessible through the plan cache object of a specific collection,
i.e. ``db.collection.getPlanCache().help()``.


* - :method:`PlanCache.list()`

- Returns the plan cache information for a collection. Accessible
Expand Down Expand Up @@ -749,32 +735,26 @@ User Management

- Creates a new user.


* - :method:`db.dropUser()`

- Removes a single user.


* - :method:`db.dropAllUsers()`

- Deletes all users associated with a database.


* - :method:`db.getUser()`

- Returns information about the specified user.


* - :method:`db.getUsers()`

- Returns information about all users associated with a database.


* - :method:`db.grantRolesToUser()`

- Grants a role and its privileges to a user.


* - :method:`db.removeUser()`

- Deprecated. Removes a user from a database.
Expand All @@ -783,12 +763,10 @@ User Management

- Removes a role from a user.


* - :method:`db.updateUser()`

- Updates user data.


* - :method:`passwordPrompt()`

- Prompts for the password as an alternative to specifying passwords
Expand Down Expand Up @@ -820,47 +798,38 @@ Role Management

- Creates a role and specifies its privileges.


* - :method:`db.dropRole()`

- Deletes a user-defined role.


* - :method:`db.dropAllRoles()`

- Deletes all user-defined roles associated with a database.


* - :method:`db.getRole()`

- Returns information for the specified role.


* - :method:`db.getRoles()`

- Returns information for all the user-defined roles in a database.


* - :method:`db.grantPrivilegesToRole()`

- Assigns privileges to a user-defined role.


* - :method:`db.revokePrivilegesFromRole()`

- Removes the specified privileges from a user-defined role.


* - :method:`db.grantRolesToRole()`

- Specifies roles from which a user-defined role inherits privileges.


* - :method:`db.revokeRolesFromRole()`

- Removes inherited roles from a role.


* - :method:`db.updateRole()`

- Updates a user-defined role.
Expand Down Expand Up @@ -932,10 +901,6 @@ Replication

- Remove a member from a replica set.

* - :method:`rs.secondaryOk()`

- Allows read operations on a secondary member.

* - :method:`rs.status()`

- Returns a document with information about the state of the replica set.
Expand Down Expand Up @@ -1217,14 +1182,6 @@ Connection

- Returns the read preference tag set for the MongoDB connection.

* - :method:`Mongo.getSecondaryOk()`

- .. include:: /includes/fact-getSecondaryOk.rst

* - :method:`Mongo.isCausalConsistency()`

- Indicates whether causal consistency is enabled on the connection object.

* - :method:`Mongo.setCausalConsistency()`

- Enables or disables causal consistency on the connection object.
Expand All @@ -1233,10 +1190,6 @@ Connection

- Sets the :term:`read preference` for the MongoDB connection.

* - :method:`Mongo.setSecondaryOk()`

- .. include:: /includes/fact-setSecondaryOk.rst

* - :method:`Mongo.startSession()`

- Starts a session on the connection object.
Expand Down
36 changes: 0 additions & 36 deletions source/reference/method/Mongo.getSecondaryOk.txt

This file was deleted.

Loading