Report an error sooner for $merge 'fail' modes

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Query Execution
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            [DO NOT USE] Backlog - Query Execution
            Reporter:
            Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: