Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
Fully Compatible
-
Query 2017-07-31
Description
Each implementation of the DocumentSource interface must override DocumentSource::getNext(), and any implementation of this method is required to check for interrupt during execution. This part of the contract is not enforced, so of course there are at least a few stages that do not follow it, such as $currentOp and $collStats.
We should at least fix these two (and any others that are missing it), and consider making this contract enforceable, either through a test or through a non-virtual getNext() and a virtualized doGetNext() as we do for PlanStage::work() and PlanStage::doWork().