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

Exec stages do not need to call documentNeedsFetch() for non-yielding plans

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Won't Fix
    • None
    • None
    • Querying
    • None

    Description

      Currently there are four stages which ask the storage engine whether a document is likely in memory, and if not request a yield by returning NEED_FETCH:

      • CollectionScan
      • IDHackStage
      • FetchStage
      • MultiIteratorStage

      These stages have no knowledge of the plan's yield policy, and must call documentNeedsFetch() even for plans that will never yield. Any NEED_FETCH requests from these stages for a non-yielding plan will simply be ignored. We can avoid this overhead by passing a flag to any stage which might return NEED_FETCH, and ensure that the stage only can request a yield when the flag is set.

      Attachments

        Issue Links

          Activity

            People

              david.storch@mongodb.com David Storch
              david.storch@mongodb.com David Storch
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: