[SERVER-67722] Shard cursor is not killed on MaxTimeMSExpired Created: 30/Jun/22 Updated: 29/Oct/23 Resolved: 22/Dec/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0, 6.0.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Romans Kasperovics | Assignee: | Romans Kasperovics |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | greenerbuild | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||
| Backport Requested: |
v6.2, v6.0
|
||||||||||||||||||||||||||||||||
| Steps To Reproduce: | The test max_time_ms_does_not_leak_shard_cursor.js fails sporadically and we might need to find a way to stabilise the reproduction of the problem. |
||||||||||||||||||||||||||||||||
| Sprint: | QE 2022-10-31, QE 2022-11-14, QE 2022-11-28, QE 2022-12-12, QE 2022-12-26 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||||||||||
| Description |
|
In This means there are few more reasons why a shard cursor might still remain alive. In some of BFGs the shard response contains the MaxTimeMSExpired error, but the shard cursor is not deleted. In some other BFGs, the shard returns NetworkInterfaceExceededTimeLimit instead of MaxTimeMSExpired. Possible solution idea: the remaining time is transferred from the cursor to the opCtx. Perhaps, the timeout should be removed from opCtx at the end of getMore. |
| Comments |
| Comment by Githook User [ 25/Jan/23 ] | |||||||||||
|
Author: {'name': 'Romans Kasperovics', 'email': 'romans.kasperovics@mongodb.com', 'username': 'romanskas'}Message: | |||||||||||
| Comment by Githook User [ 22/Dec/22 ] | |||||||||||
|
Author: {'name': 'Romans Kasperovics', 'email': 'romans.kasperovics@mongodb.com', 'username': 'romanskas'}Message: | |||||||||||
| Comment by Romans Kasperovics [ 05/Sep/22 ] | |||||||||||
|
As expected, MaxTimeMSExpired can be thrown outside getMore inner body in a shard. In this case, the shard returns MaxTimeMSExpired, but the cursor is still alive. Here is a way to reproduce it by using the waitBeforeUnpinningOrDeletingCursorAfterGetMoreBatch failpoint:
|