Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1782

Aggregation with $out not always sent to primary

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.4
    • Affects Version/s: None
    • Component/s: None
    • None

      Based on the check here, the read preference should not be set for an aggregation that contains a $out (or $merge). However, when the pipeline is checked for a $out stage here, it does LookupErr("$out") on an array document that looks like this:

      {"0": {"$out": {"db": "test_db","coll": "test_dcoll"}}}
      

      So no top-level $out is found, and the readPref is being set, resulting in a potential error on $out.

            Assignee:
            isabella.siu@mongodb.com Isabella Siu (Inactive)
            Reporter:
            daniel.ernst@mongodb.com Daniel Ernst
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: