diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index a50bb7a6e9d..b5f01b24d25 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -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(), + "opGetMore": NumberLong(), + "opKillCursors": NumberLong(), + "opDelete": NumberLong(), + "opUpdate": NumberLong(), + "opInsert": NumberLong(), + "total": NumberLong(), + } + + 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: diff --git a/source/release-notes/5.0-compatibility.txt b/source/release-notes/5.0-compatibility.txt index 80d006527a0..ab817161b1c 100644 --- a/source/release-notes/5.0-compatibility.txt +++ b/source/release-notes/5.0-compatibility.txt @@ -471,7 +471,7 @@ MongoDB 5.0 deprecates the following - ``OP_KILL_CURSORS`` Newer driver versions use :ref:`OP_MSG ` instead of these -deprecated op codes. +deprecated opcodes. The related commands and methods are also deprecated in MongoDB 5.0: diff --git a/source/release-notes/5.1.txt b/source/release-notes/5.1.txt index b293432c72e..95e79dd85cc 100644 --- a/source/release-notes/5.1.txt +++ b/source/release-notes/5.1.txt @@ -115,6 +115,10 @@ Aggregation Metrics indicates how often :ref:`match expressions ` ran. +Opcode Counters + - :serverstatus:`opcounters.deprecated` A count of how often + deprecated opcodes run. + Resharding Statistics - :serverstatus:`shardingStatistics.resharding.lastOpEndingChunkImbalance`