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

Make diskRequirement in StageConstraints in DocumentSource reflect child pipeline requirements.

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Backport Requested:
      v4.0
    • Epic Link:
    • Sprint:
      Query 2018-09-24

      Description

      Currently, if a stage (e.g. `$lookup`) has a "sub" pipeline that requires it to write persistent data, the stage's diskRequirement doesn't reflect that.

      Instead the parent stage should have the max diskRequirement of it's pipeline's stages under the total ordering

      kNoDiskUse < kWritesTmpData < kWritesPersistentData
      

      e.g. of the bug https://github.com/mongodb/mongo/blob/b93fe0e61bf7e8bc96da2edeb66afa1b915b0b77/src/mongo/db/pipeline/document_source_lookup.h#L100-L112

      https://github.com/mongodb/mongo/blob/b93fe0e61bf7e8bc96da2edeb66afa1b915b0b77/src/mongo/db/pipeline/document_source_facet.cpp#L232-L265 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kyle.suarez Kyle Suarez
              Reporter:
              samuel.mercier Samuel Mercier (Inactive)
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: