[DRIVERS-1826] Investigate changes in PM-912: Remove legacy wire protocol opcodes Created: 30/Jun/21  Updated: 27/May/22  Resolved: 08/Jul/21

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Epic Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Driver Changes: Needed
Server Compat: 5.1

 Description   
Downstream Change Summary

The server will return an error in 5.1.0 whenever it receives an OP_QUERY find operation or an OP_GET_MORE. It will also return an error for OP_QUERY commands other than hello/isMaster.

The server will not service OP_INSERT, OP_DELETE, OP_UPDATE, or OP_KILL_CURSORS messages. All it will do in 5.1.0 upon receipt of these messages is close the connection.

As part of PM-912, starting with 5.1.0, all of the OP_QUERY-specific operators listed here will be removed (except for $natural, which is not affected): https://docs.mongodb.com/manual/reference/operator/query-modifier/. To provide explicit examples, we are removing support for $explain and $query, since these only make sense in the context of --readMode "legacy":

https://docs.mongodb.com/manual/reference/operator/meta/explain/
https://docs.mongodb.com/manual/reference/operator/meta/query/

Also we're removing the following mongo shell command-line parameters

  • useLegacyWriteOps
  • writeMode
  • readMode
  • rpcProtocols

The mongo shell will no longer support the OP_QUERY RPC protocol, but rather will always use OP_MSG (except for running an OP_QUERY isMaster as part of the connection handshake). For this reason, the mongo shell will no longer successfully connect to servers older than 3.6.

PM Ticket Summary

Summary

Remove support for OP_QUERY, OP_GET_MORE, OP_KILL_CURSORS, OP_DELETE, OP_UPDATE, OP_INSERT, and the getLastError command.

Motivation

These legacy wire protocol formats have long been out of use, as modern drivers favor the OP_MSG protocol. They are being deprecated by PM-911. There is plenty of server code that can be dramatically simplified by removing support for these old wire protocol op codes.

Documentation

[Scope Document]



 Comments   
Comment by Alexander Golin (Inactive) [ 08/Jul/21 ]

Closing as won't do because we are planning to drop support for all server versions up to but not including 3.6. The removal of these legacy opcodes will be intrinsically handled by dropping support for the old versions.

Generated at Thu Feb 08 08:24:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.