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

the shell should not set slaveOk if a read preference is not set on the connection

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.8
    • Affects Version/s: 3.1.7
    • Component/s: JavaScript, Querying, Shell
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Platform 8 08/28/15

      This code assumes the read preference mode has been set, but in some cases it is uninitialized (undefined), in which case it is not equal to "primary", so the slaveOk option is set. If a read preference is not specified, it should default to "primary".

      This seems to be the root cause of the linked build failure.

      The attached patch helped diagnose the issue, and could be useful for debugging.

            Assignee:
            adam.midvidy Adam Midvidy
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: