[SERVER-17763] Make unpin of ClientCursor exception safe for getMore on aggregation cursors Created: 26/Mar/15 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Quint Iteration 7 |
| Participants: |
| Description |
|
Locking behavior for getMore on an aggregation cursor is special. In particular, MODE_IS database and collection locks are only acquired in order to unpin the ClientCursor. The implementation of this is currently not exception safe: currently, if an exception is thrown during the execution of the query, the ClientCursor will be unpinned out of the locks (see TODO in the code). |