[SERVER-46255] establishCursors/AsyncRequestsSender can leave dangling request if interrupted Created: 19/Feb/20 Updated: 08/Jan/24 Resolved: 28/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking, Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc4, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Nicholas Zolnierz |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Query 2020-03-09, Query 2020-03-23, Query 2020-04-06, Query 2020-04-20, Query 2020-05-04 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
If the AsyncRequestsSender is interrupted after sending one or more requests, it may not be able to gracefully cancel that request. establishCursors() has some cleanup logic to mitigate this, but I'm pretty sure that if we're interrupted then this line will also throw the interrupted error, and we won't be able to clean up our cursors. |
| Comments |
| Comment by Githook User [ 06/May/20 ] |
|
Author: {'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}Message: (cherry picked from commit 93476f545de27ee61fd69eeab23adbff7f57b932) |
| Comment by Githook User [ 28/Apr/20 ] |
|
Author: {'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}Message: |
| Comment by Githook User [ 28/Apr/20 ] |
|
Author: {'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}Message: Revert " This reverts commit aa2e0ee6d817951a29f2fec33d374d13d8f46802. |
| Comment by Githook User [ 28/Apr/20 ] |
|
Author: {'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}Message: |
| Comment by Nicholas Zolnierz [ 05/Mar/20 ] |
|
I've spent some time on this and haven't reached a fully robust solution, but some thoughts so far:
From my understanding, the opKey/killOperations fix will handle (1) but not the other 2 scenarios. In fact, from testing, the likelihood of sending a killOperations command while the remote node is still processing the original request is far less than the (2) and (3). I'm looking into a potential workaround by extending killOperations to also lookup any cursors with the same opKey. |
| Comment by Mira Carey [ 19/Feb/20 ] |
|
See |
| Comment by Charlie Swanson [ 19/Feb/20 ] |
|
mira.carey@mongodb.com suggests that there is a new (or coming soon?) thing called OperationKey and killOperations that can help us here. |