Estimated size of lookup-ed docs may overflow

XMLWordPrintableJSON

    • 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              Sam Mercier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: