[SERVER-58035] Remove db.runCommandWithMetadata from mongo shell Created: 23/Jun/21 Updated: 29/Oct/23 Resolved: 23/Dec/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0, 5.0.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | George Wangensteen | Assignee: | Blake Oler |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v5.0
|
||||||||
| Sprint: | Service Arch 2021-12-13, Service Arch 2022-1-10 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 142 | ||||||||
| Description |
|
The db.runCommandWithMetadata shell helper was used to send messages to the server in the OP_COMMAND wire protocol message format, which has been deprecated since 3.6 (and was only used in 3.2). Currently, it takes both the "metadata" and "command body" bsonobjs that would be used to build a OP_COMMAND, and builds a single bsonobj out of both, which it then packs into an OP_MSG to send to the server as the message's body. This can generate BFs when the fuzzer generates metadata and command body bsonobjs that share a field name, as a bson with duplicate keys will then be created after these are concatenated and packed into an OP_MSG. (In invariant here will be hit when the OP_MSG is serialized in preparation of the shell sending it to the server) Because this helper is meant to test a protocol that has been out-of-use since 3.6, we should just remove it entirely from the shell and the fuzzer to prevent further BFs/required maintenance. This should also let us clean up a fair amount of supporting code in the shell for this function. |
| Comments |
| Comment by Githook User [ 06/Jan/22 ] |
|
Author: {'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}Message: (cherry picked from commit 02c07c102b0c6d97085fb02805b0e41dedca0a46) |
| Comment by Githook User [ 23/Dec/21 ] |
|
Author: {'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}Message: |
| Comment by Githook User [ 21/Dec/21 ] |
|
Author: {'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}Message: |
| Comment by George Wangensteen [ 23/Jun/21 ] |
|
cc max.hirschhorn if you're interested |