Skip to content
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

DOCSP-17329 remove legacy wire protocols #6139

Merged
merged 1 commit into from
Nov 12, 2021
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Any code explicitly using ``getLastError``, ``db.getLastError()``, or
``db.getLastErrorObj()`` should instead use the CRUD API to issue the
write with the desired :ref:`write concern <write-concern>`.
Information about the success or failure of the write operation will be
provided directly by the driver as a return value.

5 changes: 5 additions & 0 deletions source/includes/5.1/fact-wont-connect-past-3.6.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Starting in MongoDB 5.1, certain wire protocol opcodes are removed from
the :binary:`~bin.mongo` shell. The shell will not connect to any
version of :binary:`~bin.mongod` or :binary:`~bin.mongos` less than
3.6 since these versions do not support the OP_MSG RPC protocol.

22 changes: 22 additions & 0 deletions source/includes/5.1/removed-shell-parameters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MongoDB 5.1 removes the following parameters from the
:binary:`~bin.mongo` shell:

.. list-table::
:header-rows: 1
:widths: 25 75

* - Removed Parameters
- Description
* - ``--useLegacyWriteOps``
- The ability to use OP_INSERT, OP_UPDATE, and OP_DELETE is
removed. The shell will only use OP_MSG write commands.
* - ``--writeMode``
- The ability to use OP_INSERT, OP_UPDATE, and OP_DELETE is
removed. The shell will only use OP_MSG write commands.
* - ``--readMode``
- The ability to use OP_QUERY legacy find is removed. The shell
will only use OP_MSG find commands.
* - ``--rpcProtocols``
- Support for the OP_QUERY RPC protocol is removed. The shell
will always use the OP_MSG RPC protocol.

3 changes: 3 additions & 0 deletions source/includes/fact-write-concern-spec-link.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Optional. The level of :ref:`write concern <write-concern>` for the
operation. See :ref:`wc-specs`.

2 changes: 1 addition & 1 deletion source/includes/note-bulk-inserts-on-sharded-clusters.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. note::

For bulk inserts on sharded clusters, the :dbcommand:`getLastError`
For bulk inserts on sharded clusters, the ``getLastError``
command alone is insufficient to verify success. Applications
should must verify the success of bulk inserts in application
logic.
4 changes: 0 additions & 4 deletions source/reference/command.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ Query and Write Operation Commands

- Returns and modifies a single document.

* - :dbcommand:`getLastError`

- Returns the success status of the last operation.

* - :dbcommand:`getMore`

- Returns batches of documents currently pointed to by the cursor.
Expand Down
36 changes: 1 addition & 35 deletions source/reference/command/createRole.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,69 +53,35 @@ Definition
:widths: 20 20 80

* - Field

- Type

- Description

* - ``createRole``

- string

- The name of the new role.



* - ``privileges``

- array

- The privileges to grant the role. A privilege consists of a resource
and permitted actions. For the syntax of a privilege, see the
:data:`~admin.system.roles.privileges` array.

You must include the ``privileges`` field. Use an
empty array to specify *no* privileges.



* - ``roles``

- array

- An array of roles from which this role inherits privileges.

You must include the ``roles`` field. Use an empty array to specify
*no* roles to inherit from.



* - ``authenticationRestrictions``

- array

- Optional.

.. include:: /includes/fact-auth-restrictions-role-desc.rst



* - ``writeConcern``

- document

- Optional. The level of :doc:`write concern </reference/write-concern>` to apply
to this operation. The ``writeConcern`` document uses the same fields
as the :dbcommand:`getLastError` command.



- .. include:: /includes/fact-write-concern-spec-link.rst
* - ``comment``

- any

- .. include:: /includes/extracts/comment-content.rst

.. versionadded:: 4.4

.. |local-cmd-name| replace:: :dbcommand:`createRole`
Expand Down
85 changes: 17 additions & 68 deletions source/reference/command/createUser.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,13 @@ Definition
:widths: 20 20 80

* - Field

- Type

- Description

* - ``createUser``

- string

- The name of the new user.



* - ``pwd``

- string

- The user's password. The ``pwd`` field is not
required if you run |local-cmd-name| on the ``$external``
database to create users who have credentials stored externally to
Expand All @@ -79,81 +69,52 @@ Definition
The value can be either:

- the user's password in cleartext string, or

- :method:`passwordPrompt()` to prompt for the user's password.

.. tip::

.. include:: /includes/extracts/4.2-changes-passwordPrompt.rst




* - ``customData``

- document

- Optional. Any arbitrary information. This field can be used to store any data
an admin wishes to associate with this particular user. For example,
this could be the user's full name or employee id.




* - ``roles``

- array

- The roles granted to the user. Can specify an empty array ``[]`` to
create users without roles.




* - ``digestPassword``

- boolean

- Optional. Indicates whether the server or the client digests the password.

If true, the server receives undigested password from the client and
digests the password.

If false, the client digests the password and passes the digested
password to the server. Not compatible with ``SCRAM-SHA-256``

.. versionchanged:: 4.0

The default value is ``true``. In earlier versions, the default
value is ``false``.




* - ``writeConcern``

- document

- Optional. The level of :doc:`write concern </reference/write-concern>` for the
creation operation. The ``writeConcern`` document takes the same
fields as the :dbcommand:`getLastError` command.



- .. include:: /includes/fact-write-concern-spec-link.rst
* - ``authenticationRestrictions``

- array

- Optional. The authentication restrictions the server enforces on the created
user. Specifies a list of IP addresses and
:abbr:`CIDR (Classless Inter-Domain Routing)` ranges from which the
user is allowed to connect to the server or from which the server can
accept users.

.. versionadded:: 3.6



* - ``mechanisms``

- array

- Optional. Specify the specific SCRAM mechanism or mechanisms for creating
SCRAM user credentials. If :parameter:`authenticationMechanisms` is
specified, you can only specify a subset of the
Expand All @@ -162,16 +123,11 @@ Definition
Valid values are:

- ``"SCRAM-SHA-1"``

- Uses the ``SHA-1`` hashing function.

- Uses the ``SHA-1`` hashing function.
- ``"SCRAM-SHA-256"``

- Uses the ``SHA-256`` hashing function.

- Requires featureCompatibilityVersion set to ``4.0``.

- Requires digestPassword to be ``true``.
- Uses the ``SHA-256`` hashing function.
- Requires featureCompatibilityVersion set to ``4.0``.
- Requires digestPassword to be ``true``.

The default for featureCompatibilityVersion is ``4.0`` is both
``SCRAM-SHA-1`` and ``SCRAM-SHA-256``.
Expand All @@ -180,13 +136,9 @@ Definition
``SCRAM-SHA-1``.

.. versionadded:: 4.0




* - ``digestPassword``

- boolean

- Optional. Indicates whether the server or the client digests the password.

If true, the server receives undigested password from the client and
Expand All @@ -199,14 +151,11 @@ Definition

The default value is ``true``. In earlier versions, the default
value is ``false``.


* - ``comment``

* - ``comment``
- any

- .. include:: /includes/extracts/comment-content.rst

.. versionadded:: 4.4


Expand Down
21 changes: 2 additions & 19 deletions source/reference/command/dropAllRolesFromDatabase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,37 +42,20 @@ Definition
:widths: 20 20 80

* - Field

- Type

- Description

* - ``dropAllRolesFromDatabase``

- integer

- Specify ``1`` to drop all :ref:`user-defined <user-defined-roles>`
roles from the database where the command is run.



* - ``writeConcern``

- document

- Optional. The level of :doc:`write concern </reference/write-concern>` for the
removal operation. The ``writeConcern`` document takes the same
fields as the :dbcommand:`getLastError` command.


- /includes/source/fact-write-concern-spec-link.rst
* - ``comment``

- any

- .. include:: /includes/extracts/comment-content.rst

.. versionadded:: 4.4

.. versionadded:: 4.4

Required Access
---------------
Expand Down
20 changes: 2 additions & 18 deletions source/reference/command/dropAllUsersFromDatabase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,18 @@ Definition
:widths: 20 20 80

* - Field

- Type

- Description

* - ``dropAllUsersFromDatabase``

- integer

- Specify ``1`` to drop all the users from the current database.



* - ``writeConcern``

- document

- Optional. The level of :doc:`write concern </reference/write-concern>` for the
removal operation. The ``writeConcern`` document takes the same
fields as the :dbcommand:`getLastError` command.


- .. include:: /includes/fact-write-concern-spec-link.rst
* - ``comment``

- any

- .. include:: /includes/extracts/comment-content.rst

.. versionadded:: 4.4


Expand Down
Loading