[SERVER-58337] Log deprecation warning and bump serverStatus counter upon receipt of OP_QUERY command Created: 07/Jul/21 Updated: 29/Oct/23 Resolved: 09/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0, 5.0.9 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | Irina Yatsenko (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Backport Requested: |
v5.0
|
||||||||||||||||
| Sprint: | Query Execution 2021-07-12, Query Execution 2021-07-26 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
In 5.0, we deprecated OP_QUERY find operations. The deprecation is surfaced to the user through logging a warning with log id 5578800, as well as incrementing the db.serverStatus().opcounters.deprecated.query counter. We also intended to deprecate OP_QUERY commands other than isMaster/hello (since OP_QUERY isMaster command is used for the connection handshake). However, unlike OP_QUERY find operations, OP_QUERY commands are currently not reflected in either the logs or serverStatus. The task for this ticket is to add this logging and to bump the serverStatus counters when either mongod or mongos receives an OP_QUERY command other than "isMaster" or "hello". This needs to happen at a fairly high level in the service entry point, before the OP_QUERY command is upconverted to look like an OP_MSG request. As a quick example of this problem in practice, I connected to the server with a 4.4 shell, forcing the shell to use the OP_QUERY RPC protocol, and then ran a command:
The log line for the ping command indicates that the protocol used was "op_query":
However, I see no deprecation warning in the logs, and the serverStatus counter is not incremented. We should backport this ticket to 5.0, since 5.0 is where the deprecation is first in effect. We can also consider backporting the opcounters portion of the change to even older branches, although this is not strictly required. |
| Comments |
| Comment by Githook User [ 04/May/22 ] |
|
Author: {'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}Message: |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 09/Jul/21 ] |
|
Author: {'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}Message: All commands, except isMaster and hello, that use OP_QUERY with $cmd namespace are now flagged as deprecated. |