Ensure mongo shell respects readPreference for $out and $merge when 'Mongo.setReadPref' is called

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Querying, Shell
    • None
    • Minor Change
    • Query 2020-03-23, Query 2020-05-18
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When Mongo.setReadPref('secondary') is called from the mongo shell when connected to a secondary, an aggregate with $out/$merge errors with 'NotMasterNoSlaveOk' and doesn't run. The only way to get this to work is to use the legacy 'Mongo.setSlaveOk(true)'.

      Update Mongo.setReadPref() to respect the specified readPreference.

            Assignee:
            Mihai Andrei
            Reporter:
            Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: