Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-31293

Don't consider readPreference "primary" as equivalent to 'slaveOk' in OP_QUERY find path

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.0.15, 3.2.17, 3.4.10, 3.6.0-rc1
    • Fix Version/s: 3.6.4, 3.7.2
    • Component/s: Querying
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.6
    • Sprint:
      Query 2018-01-29

      Description

      In db/query/find.cpp, we check if it's safe to serve the current read, but we pass the value of slaveOk based on whether there is any readPrefernce provided, rather than checking that the read preference is not "primary". This could potentially allow queries run via this path to execute against a secondary, even if they were run with the "primary" read preference.

        Attachments

          Activity

            People

            Assignee:
            bernard.gorman Bernard Gorman
            Reporter:
            spencer Spencer Brody
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: