-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Testing
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In the process of testing CSHARP-2632, we discovered that there is a bug in the transformation of the OP_QUERY based command into a pseudo command for APM purposes (for server versions 3.2 and 3.4).
$query is an artifact of OP_QUERY commands. It should not be present in the pseudo command manufactured for APM, but we saw pseudo commands that looked like
{ "$query" : { "find" : "testcollection", "filter" : { "x" : 2 } }, "$readPreference" : { "mode" : "primaryPreferred" } }
Additionally, for 3.0 and lower, "$readPreference" gets incorrectly changed to "readPreference", which does not match current standards for command messages.
The actual wrapping of the message takes place in CommandUsingQueryMessageWireProtocol.cs, which may be a good place to start.
For reference, https://evergreen.mongodb.com/version/5d42f783d1fe07102ee6a681 is an evergreen patch that shows this incorrect behavior.