@@ -1444,6 +1444,35 @@ opcounters
1444
1444
</reference/command>` **except** the write commands:
1445
1445
:dbcommand:`insert`, :dbcommand:`update`, and :dbcommand:`delete`.
1446
1446
1447
+ .. serverstatus:: opcounters.deprecated
1448
+
1449
+ This section only appears in the :method:`db.serverStatus()` output
1450
+ when one of the following, deprecated opcodes has been used:
1451
+
1452
+ .. code-block:: javascript
1453
+
1454
+ "deprecated": {
1455
+ "opQuery": NumberLong(<num>),
1456
+ "opGetMore": NumberLong(<num>),
1457
+ "opKillCursors": NumberLong(<num>),
1458
+ "opDelete": NumberLong(<num>),
1459
+ "opUpdate": NumberLong(<num>),
1460
+ "opInsert": NumberLong(<num>),
1461
+ "total": NumberLong(<num>),
1462
+ }
1463
+
1464
+ These opcodes were deprecated in MongoDB 4.0.26 and support for
1465
+ these opcodes is removed in MongoDB 5.1. Starting in MongoDB 5.1,
1466
+ :binary:`~bin.mongod` refuses requests that use a deprecated
1467
+ opcode and increments the corresponding counter.
1468
+
1469
+ ``OP_QUERY`` is an exception to the general rule.
1470
+ :binary:`~bin.mongod` continues to support ``hello`` and
1471
+ ``isMaster`` requests that use ``OP_QUERY``. :binary:`~bin.mongod`
1472
+ refuses any other ``OP_QUERY`` requests.
1473
+
1474
+ The counters are reset when :binary:`~bin.mongod` starts.
1475
+
1447
1476
.. _server-status-opcountersrepl:
1448
1477
.. _server-status-opcounters-repl:
1449
1478
0 commit comments