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

Do not create a cursor in runAgg() if results can fit in a single batch

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • QI 2023-10-02, QI 2023-10-16

      For find queries, a cursor is created if and only if the results don't fit inside a single batch.

       

      However, for agg queries it appears a cursor is always created regardless of whether or not a further batch is required. We should change this for agg to mirror find behavior to not waste an unnecessary cursor. 

      Update:

            Assignee:
            chris.wolff@mongodb.com Chris Wolff
            Reporter:
            maddie.zechar@mongodb.com Maddie Zechar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: