@@ -249,21 +249,39 @@ evaluate to certain values. See :ref:`$mod behavior <mod-behavior>`.
249
249
Legacy Opcodes Removed
250
250
~~~~~~~~~~~~~~~~~~~~~~
251
251
252
- MongoDB drivers have used :ref:`OP_MSG <wire-op-msg>` instead of
253
- :ref:`OP_QUERY <wire-op-query>` and the other legacy opcodes since
254
- MongoDB v3.6.
255
-
256
- This release removes support for the following legacy opcodes:
252
+ MongoDB 6.0 removes support for the following legacy opcodes and
253
+ database commands:
257
254
258
255
- :ref:`OP_INSERT <wire-op-insert>`
259
256
- :ref:`OP_DELETE <wire-op-delete>`
260
257
- :ref:`OP_UPDATE <wire-op-update>`
261
258
- :ref:`OP_KILL_CURSORS <wire-op-kill-cursors>`
262
259
- :ref:`OP_GET_MORE <wire-op-get-more>`
263
260
- :ref:`OP_QUERY <wire-op-query>`
261
+ - ``getLastError``
262
+
263
+ .. warning:: Upgrade Drivers
264
+
265
+ To avoid disruption due to the removal of these opcodes, **upgrade your
266
+ driver to the latest version**.
267
+
268
+ If you attempt to connect to a MongoDB 3.4 or older :binary:`mongod`
269
+ instance with a MongoDB 5.1 or newer :binary:`~bin.mongo` shell, you
270
+ will receive an error message like the following:
264
271
265
- To avoid disruption due to the removal of these op codes, please
266
- upgrade your driver to the latest version.
272
+ .. code-block:: none
273
+ :copyable: false
274
+
275
+ Connection handshake failed. Is your mongod 3.4 or older?
276
+ :: caused by :: network error while attempting to run command
277
+ 'isMaster' on host '127.0.0.1:27017'
278
+
279
+ mongod Responses to Legacy Opcodes
280
+ ``````````````````````````````````
281
+
282
+ Since MongoDB 3.6, MongoDB drivers have used :ref:`OP_MSG <wire-op-msg>`
283
+ instead of :ref:`OP_QUERY <wire-op-query>` and the other legacy opcodes
284
+ and commands.
267
285
268
286
:binary:`mongod` will close the connection and will not respond to:
269
287
@@ -272,40 +290,31 @@ upgrade your driver to the latest version.
272
290
- :ref:`OP_UPDATE <wire-op-update>`
273
291
- :ref:`OP_KILL_CURSORS <wire-op-kill-cursors>`
274
292
275
- :binary:`mongod` will return an error for:
293
+ :binary:`mongod` will keep the connection open and return an error for:
276
294
277
- - :ref:`OP_GET_MORE <wire-op-get-more>`
278
- - :ref:`OP_QUERY <wire-op-query>` legacy find
279
-
280
- The :ref:`OP_QUERY <wire-op-query>` RPC protocol may be used with the
281
- following commands:
282
-
283
- - ``_isSelf``
284
- - ``authenticate``
285
- - ``buildinfo``
286
- - ``buildInfo``
287
- - ``hello``
288
- - ``ismaster``
289
- - ``isMaster``
290
- - ``saslContinue``
291
- - ``saslStart``
292
-
293
- :ref:`OP_QUERY <wire-op-query>` will return an error if it is used for
294
- a find operation. All other commands will be rejected if issued as
295
- :ref:`OP_QUERY <wire-op-query>`.
296
-
297
- If you attempt to connect to a MongoDB 3.4, or older, :binary:`mongod`
298
- instance with a MongoDB 5.1 or newer :binary:`~bin.mongo` shell, you
299
- will receive an error message like the following:
295
+ - The ``getLastError`` database command
296
+ - :ref:`OP_GET_MORE <wire-op-get-more>`
297
+ - :ref:`OP_QUERY <wire-op-query>` finds
298
+ - Most :ref:`OP_QUERY <wire-op-query>`
299
+ :abbr:`RPC (Remote Procedure Call)` command messages
300
300
301
- .. code-block:: javascript
302
- :copyable: false
301
+ .. note:: OP_QUERY RPC Commands
303
302
304
- // Reformated for clarity. The message appears on a single line.
303
+ The :ref:`OP_QUERY <wire-op-query>` :abbr:`RPC (Remote Procedure Call)`
304
+ protocol may be used with the following commands:
305
305
306
- Connection handshake failed. Is your mongod 3.4 or older?
307
- :: caused by :: network error while attempting to run command
308
- 'isMaster' on host '127.0.0.1:27017'
306
+ - ``_isSelf``
307
+ - ``authenticate``
308
+ - ``buildinfo``
309
+ - ``buildInfo``
310
+ - ``hello``
311
+ - ``ismaster``
312
+ - ``isMaster``
313
+ - ``saslContinue``
314
+ - ``saslStart``
315
+
316
+ All other commands will be rejected if issued as :ref:`OP_QUERY
317
+ <wire-op-query>`.
309
318
310
319
.. _6.0-js-engine-change:
311
320
0 commit comments