Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2764

aggregate inherits writeConcern only if the "pipeline" parameter contains a "pipeline" field

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: libmongoc
    • Labels:
      None

      Description

      mongo_collection_aggregate used to accept only a document that includes a "pipeline" array. A pipeline that includes an $out stage looks like:

      {pipeline: [{...}, {$out: ...}]}
      

      If the function finds "$out" but there's no explicit writeConcern then it inherits the collection's writeConcern, per spec.

      In CDRIVER-2606 we also accept a BSON array passed directly, not as an element of the input document. That work was incomplete: if mongoc_collection_aggregate is passed a BSON array directly then it doesn't search the array for "$out" and doesn't inherit writeConcern from its collection object.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jesse A. Jesse Jiryu Davis
              Reporter:
              jesse A. Jesse Jiryu Davis
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: