Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13096

Investigate changes in SERVER-43683: Make find command with allowDiskUse option work against a view



    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.3.1
    • manual, Server
    • None



      Downstream Change Summary

      Prior to this work, there was no way to specify 'allowDiskUse:true' when executing a find command against a view. This ticket (combined with work from SERVER-42077 and SERVER-7694) ensures that when a user adds the 'allowDiskUse:true' option to a find command executed against a view, any $sort or $group stages that would consume too much memory will spill to disk. Previously, users could only opt into this behavior by running an aggregate command against a view.

      Description of Linked Ticket

      Today, a find command can be executed against a view which contains blocking stages like $sort or $group that can consume a lot of memory. These stages will fail at runtime if the data size exceeds some memory threshold. If the user runs an aggregate command against the view, they can specify that disk use is allowed during execution of the query. The execution engine will relieve memory consumption by spilling to disk, allowing the query to succeed.

      The same cannot currently be achieved with a find command. However, we recently added support for the allowDiskUse option in the find command: see related ticket SERVER-42077. This ticket tracks the work to make sure that the allowDiskUse option is respected when executing a find command against a view, and to add an integration test proving this works correctly.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)


        Issue Links



              jeffrey.allen@mongodb.com Jeffrey Allen
              backlog-server-pm Backlog - Core Eng Program Management Team
              Jess Mokrzecki Jess Mokrzecki
              0 Vote for this issue
              2 Start watching this issue


                3 years, 9 weeks, 6 days ago