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
29 changes: 29 additions & 0 deletions source/reference/command/serverStatus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2042,6 +2042,35 @@ opcounters

.. include:: /includes/extracts/4.2-changes-opcounters-type.rst

.. serverstatus:: opcounters.deprecated

This section only appears in the :method:`db.serverStatus()` output
when one of the following, deprecated opcodes has been used:

.. code-block:: javascript

"deprecated": {
"opQuery": NumberLong(<num>),
"opGetMore": NumberLong(<num>),
"opKillCursors": NumberLong(<num>),
"opDelete": NumberLong(<num>),
"opUpdate": NumberLong(<num>),
"opInsert": NumberLong(<num>),
"total": NumberLong(<num>),
}

These opcodes were deprecated in MongoDB 5.0 and support for these
opcodes is removed in MongoDB 5.1. Starting in MongoDB 5.1,
:binary:`~bin.mongod` refuses requests that use a deprecated
opcode and increments the corresponding counter.

``OP_QUERY`` is an exception to the general rule.
:binary:`~bin.mongod` continues to support ``hello`` and
``isMaster`` requests that use ``OP_QUERY``. :binary:`~bin.mongod`
refuses any other ``OP_QUERY`` requests.

The counters are reset when :binary:`~bin.mongod` starts.

.. _server-status-opcountersrepl:
.. _server-status-opcounters-repl:

Expand Down
2 changes: 1 addition & 1 deletion source/release-notes/5.0-compatibility.txt
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ MongoDB 5.0 deprecates the following
- ``OP_KILL_CURSORS``

Newer driver versions use :ref:`OP_MSG <wire-op-msg>` instead of these
deprecated op codes.
deprecated opcodes.

The related commands and methods are also deprecated in MongoDB 5.0:

Expand Down
4 changes: 4 additions & 0 deletions source/release-notes/5.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ Aggregation Metrics
indicates how often
:ref:`match expressions <query-projection-operators-top>` ran.

Opcode Counters
- :serverstatus:`opcounters.deprecated` A count of how often
deprecated opcodes run.

Resharding Statistics
- :serverstatus:`shardingStatistics.resharding.lastOpEndingChunkImbalance`

Expand Down