Guard against double ExchangeBuffer dispose from DRM execution

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When $limit is pushed to shards and a pipeline contains $_internalDocumentResultsAndMetadata (which expands to two ExchangeStage consumers), $limit eagerly disposes the document-stream ExchangeStage when satisfied. Normal pipeline teardown later disposes that same consumer a second time.

      ExchangeBuffer::dispose() has invariant(!_disposed) which fires on the second call, crashing mongod. 

            Assignee:
            Daniel Segel
            Reporter:
            Daniel Segel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: