[SERVER-30174] Ensure all DocumentSource::getNext() implementations check for interrupt Created: 17/Jul/17 Updated: 30/Oct/23 Resolved: 28/Jul/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.11 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Martin Neupauer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Query 2017-07-31 |
| Participants: |
| 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(). |
| Comments |
| Comment by Githook User [ 28/Jul/17 ] |
|
Author: {'email': 'martin.neupauer@mongodb.com', 'name': 'Martin Neupauer'}Message: Add the checks to few missing places. |