"find" command for mongos can include readConcern twice

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Trivial - P5
    • 1.11.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              A. Jesse Jiryu Davis
              Reporter:
              A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: