[SERVER-18473] cursor leak on uassert in getMore Created: 14/May/15 Updated: 14/May/15 Resolved: 14/May/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.1.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | James Wahlin | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
Regarding the src/mongodb/db/query/find.cpp:getMore() function. getMore is expected to delete the ClientCursor object obtained when no longer valid. There are places in the getMore() function however when the cursor should be deleted but is not due to early exit via uassert. We should look to delete on uassert, in-line with work done for the getMore command. |
| Comments |
| Comment by J Rassi [ 14/May/15 ] |
|
This is not actually a bug: receivedGetMore() will clean up the cursor if getMore() throws a UserAssertion. See <https://github.com/mongodb/mongo/blob/r3.1.2/src/mongo/db/instance.cpp#L892>. While the way this is currently handled is indeed quite messy, there is no actual leak as far I can tell. Closing as "cannot reproduce". |