[SERVER-74071] Refactor establishShardCursors() to return OwnedRemoteCursors Created: 15/Feb/23 Updated: 23/Feb/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Davis Haupt (Inactive) | 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
|
| Participants: |
| Description |
|
Right now, establishShardCursors() returns RemoteCursors, which could cause cursors to leak if exceptions are thrown before callers have the chance to kill the cursors. The function should be modified to return OwnedRemoteCursors from the get-go so that no callers will need to worry about leaking cursors. Some callers place raw RemoteCursors into objects like AsyncResultsMerger, which should also be modified to take in owned cursors. |
| Comments |
| Comment by David Storch [ 23/Feb/23 ] |
|
davis.haupt@mongodb.com we looked at this in QE needs triage and are interpreting it as an optional improvement. Sending it to the backlog for now. |