Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2681

$query gets incorrectly wrapped around command messages

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Testing
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            katie.sadoff@mongodb.com Katie Sadoff
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: