-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
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.