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

Estimated size of lookup-ed docs may overflow

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      Set `internalLookupStageIntermediateDocumentMaxSizeBytes` to be greater than `INT_MAX`. And then make a collection of size greater than `internalLookupStageIntermediateDocumentMaxSizeBytes`.

      Show
      Set `internalLookupStageIntermediateDocumentMaxSizeBytes` to be greater than `INT_MAX`. And then make a collection of size greater than `internalLookupStageIntermediateDocumentMaxSizeBytes`.
    • Sprint:
      Query 2019-12-16

      Description

      https://github.com/mongodb/mongo/blob/0627df00250ec0bd23ee1d174b1149964bb2d29f/src/mongo/db/pipeline/document_source_lookup.cpp#L258-L266

      Since `objsize` is of type `int` it may overflow before reaching `maxBytes` which is of type `long long`.

        Attachments

          Activity

            People

            Assignee:
            sophie.saskin Sophie Saskin
            Reporter:
            samuel.mercier Sam Mercier
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: