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

Report an error sooner for $merge 'fail' modes

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Aggregation Framework
    • None
    • Query Execution

    Description

      The $merge stage performs an unordered update in batches. Each batch has a cap of either 16MB, or 100 000 update operations (which are not dynamically configurable). If we have a $merge stage with 'whenMatched=replaceWithNew whenNotMatched=fail' and updating 10 000 documents of 1KB each, and there is a single document without a match somewhere in the middle, we will still update all 10 000 documents minus 1, and raise an error only at the end. It would be much more preferable to error out as soon as we detect a document without a match.

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            anton.korshunov@mongodb.com Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: