MongoClient.connect readPreference option doesn't work for .aggregation queries, only for .find

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.0.10
    • Component/s: Core, Native
    • Environment:
      node 9, node 10
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The bug occurs only in 3.* versions of the driver, I've tested them all except beta ones...

      With readPreference=secondaryPreferred or readPreference=secondary a driver performs all .aggregate queries on master node. The unusual thing is that it works correctly for .find queries - they run on slave nodes, while heavy aggregation queries load master.

            Assignee:
            Katherine Walker (Inactive)
            Reporter:
            clutton
            None
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: