Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2650

"find" command for mongos can include readConcern twice

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial - P5 Trivial - P5
    • 1.11.0
    • None
    • libmongoc
    • None

    Description

      When we query mongos 3.2 or 3.4 with a read preference and read concern, the command should be assembled like:

      {
        "$query": {
          "find": "test", "filter": {}, "readConcern": {"level": "majority"}
        },
        "$readPreference": {
          "mode": "secondary"
        }
      }
      

      However, the driver sends:

      {
        "$query": {
          "find": "test", "filter": {}, "readConcern": {"level": "majority"}
        },
        "$readPreference": {
          "mode": "secondary"
        },
        "readConcern": {"level": "majority"}
      }
      

      mongos apparently ignores the outer readConcern.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: