-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Labels:None
-
Fully Compatible
-
ALL
-
Repl 2017-08-21, Repl 2017-09-11
-
0
An exception can be thrown during a call to PlanExecutor::getNext() if the operation times out. When this happens, we can leave DocumentSourceCursor::loadBatch() without saving state on the PlanExecutor. Normally this wouldn't be a problem, since the whole Pipeline is about to be destroyed and we will never use it again. However, now that we've introduced tailable aggregation cursors as part of the work for change streams, it's possible that we will continue using the pipeline after timing out. (There is logic in the getMore command to ignore this particular error condition for tailable cursors)
There are a couple approaches we could take to resolve this, two come to mind:
- Change PlanExecutor to swallow this error if it's tailable, and just return EOF instead.
- Change DocumentSourceCursor to extend it's ON_BLOCK_EXIT to make sure to save the state of the PlanExecutor.
- is duplicated by
-
SERVER-30414 Many callers of PlanExecutor::restoreState() ignore the return value
- Closed