[SERVER-66833] Improve warning message in the logs around removal of legacy op codes Created: 27/May/22  Updated: 29/Oct/23  Resolved: 02/Jun/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc9, 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: David Storch
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to DOCS-15396 [Server] Warn about incompatible driv... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.0
Sprint: QE 2022-05-30, QE 2022-06-13
Participants:

 Description   

In 5.1, we removed support for OP_QUERY commands, as well as the legacy op codes in general (OP_QUERY find operations, OP_GET_MORE, OP_INSERT, OP_UPDATE, etc.). If a 5.1+ server receives a wire protocol message that is no longer supported, it will bump a counter in db.serverStatus().opcodes.deprecated, return an error to the client (or close the connection if the op code is "fire and forget"), and produce a warning in the logs like this:

{"t":{"$date":"2022-05-25T16:38:22.917+00:00"},"s":"W",  "c":"COMMAND",  "id":5578800, "ctx":"conn242","msg":"Deprecated operation requested. For more details see https://dochub.mongodb.org/core/legacy-opcode-compatibility","attr":{"op":"query","clientInfo":{"address":"127.0.0.1:60450"}}}

This log message is stale. It should be updated to say not just that the operation is deprecated but that it is no longer supported. We also should create a new dochub link which points not to the information about op code deprecation in 5.0, but rather to information pertaining to the removal of support for these op codes in 5.1. For example, we could point to the relevant compatibility changes docs associated with the 5.1 release notes: https://www.mongodb.com/docs/upcoming/release-notes/5.1-compatibility/#legacy-opcodes-removed.



 Comments   
Comment by Githook User [ 02/Jun/22 ]

Author:

{'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}

Message: SERVER-66833 Improve error and log messages on attempt to use unsupported legacy op code

(cherry picked from commit 6147e2b653fe414ce8f6d64454d9b98802863ae7)
Branch: v6.0
https://github.com/mongodb/mongo/commit/20c2bd8b670dc363f6cdbeb763d68da2a8935cd0

Comment by Githook User [ 01/Jun/22 ]

Author:

{'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}

Message: SERVER-66833 Improve error and log messages on attempt to use unsupported legacy op code
Branch: master
https://github.com/mongodb/mongo/commit/6147e2b653fe414ce8f6d64454d9b98802863ae7

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