-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Querying
-
Labels:None
-
Query 2018-01-15
PlanExecutor::restoreState() returns a boolean indicating whether it's safe to use. If a WriteConflictException is encountered while restoring, we may need to yield to recover. If this is the case, some event like a collection drop could invalidate the PlanExecutor. It seems like maybe it's safe to continue after this happens, since most callers immediately call PlanExecutor::getNext afterwards, which checks if it was killed and will return PlanExecutor::DEAD immediately.
We should either make all callers handle the return value, or change it to return void if it's safe. It seems better to handle it - since calling restoreState() might leave you in a state where you have no locks.
- duplicates
-
SERVER-30410 Make sure PlanExecutor is saved when leaving DocumentSourceCursor::loadBatch()
- Closed