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

"find" command for mongos can include readConcern twice

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 1.11.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      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.

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

              Created:
              Updated:
              Resolved: