Stop expression evaluation if resulting objects exceeds specific size threshold

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In some stages that can combine several documents into one, like $lookup or $facet, we have limits on the output documents to prevent huge documents from filling up RAM.

      This makes sense, because the final resulting document must still fit within 16 MB BSON limit.

      However, if we have an expression inside $project that produces large results, it can produce arbitrary large documents, consuming all RAM.

      We should add a configuration limit to the size of intermediate documents (with, most probably, a default value of 100 MB).

       

       

              Assignee:
              Unassigned
              Reporter:
              Ivan Fefer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: