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

Allow $graphLookup to use projections to reduce memory consumption

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.11
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Server Triage

      Performing a deep $graphLookup of a large graph can result in significant memory consumption due to the retrieval of unnecessary fields.

      For example, we have a collection of documents that have:

      • id
      • parentId
      • content

      If I want to retrieve all the IDs of a specific graph, the content property is irrelevant.

      If the content property is significantly large it can cause "$graphLookup reached maximum memory consumption" errors.  By using a projection to ignore this field within a $graphLookup, memory consumption could be significantly reduced.

       

      Instead, I think we'll have to create a simplified view of the collection and use that to perform the graph lookup, unless there are better suggestions?

            Assignee:
            backlog-server-triage [HELP ONLY] Backlog - Triage Team
            Reporter:
            glenn.allen@milanote.com Glenn Allen
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: