As part of SERVER-84574 we made it so that endQueryOp may now throw an exception since it tries to acquire the global lock. This however has introduced an error scenario that couldn't happen before:
- The command starts executing the find command and successfully builds a batch.
- The command then proceeds to create a getMore cursor and enters this block.
- The block then creates a new cursor and puts the PlanExecutor in there.
- endQueryOp throws an error due to the interruption of the opCtx.
- This causes us to never release the locks as that happens in the line below.
In this scenario we would end up with a cursor that has a PlanExecutor with live locks taken.
- related to
-
SERVER-90163 CurOp::_fetchStorageStatsIfNecessary may unnecessarily cause an operation to fail
- Closed