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

Estimated size of lookup-ed docs may overflow

    • Fully Compatible
    • ALL
    • 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`.
    • Query 2019-12-16

      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`.

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

              Created:
              Updated:
              Resolved: