@@ -1866,6 +1866,35 @@ opcounters
1866
1866
1867
1867
.. include:: /includes/extracts/4.2-changes-opcounters-type.rst
1868
1868
1869
+ .. serverstatus:: opcounters.deprecated
1870
+
1871
+ This section only appears in the :method:`db.serverStatus()` output
1872
+ when one of the following, deprecated opcodes has been used:
1873
+
1874
+ .. code-block:: javascript
1875
+
1876
+ "deprecated": {
1877
+ "opQuery": NumberLong(<num>),
1878
+ "opGetMore": NumberLong(<num>),
1879
+ "opKillCursors": NumberLong(<num>),
1880
+ "opDelete": NumberLong(<num>),
1881
+ "opUpdate": NumberLong(<num>),
1882
+ "opInsert": NumberLong(<num>),
1883
+ "total": NumberLong(<num>),
1884
+ }
1885
+
1886
+ These opcodes were deprecated in MongoDB 4.4.7 and support for these
1887
+ opcodes is removed in MongoDB 5.1. Starting in MongoDB 5.1,
1888
+ :binary:`~bin.mongod` refuses requests that use a deprecated
1889
+ opcode and increments the corresponding counter.
1890
+
1891
+ ``OP_QUERY`` is an exception to the general rule.
1892
+ :binary:`~bin.mongod` continues to support ``hello`` and
1893
+ ``isMaster`` requests that use ``OP_QUERY``. :binary:`~bin.mongod`
1894
+ refuses any other ``OP_QUERY`` requests.
1895
+
1896
+ The counters are reset when :binary:`~bin.mongod` starts.
1897
+
1869
1898
.. _server-status-opcountersrepl:
1870
1899
.. _server-status-opcounters-repl:
1871
1900
0 commit comments