[SERVER-77095] Fix canceling transaction API when using an InlineExecutor Created: 12/May/23 Updated: 29/Oct/23 Resolved: 15/May/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0, 7.0.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jack Mulrow | Assignee: | Jack Mulrow |
| 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: |
v7.0
|
||||||||||||||||
| Sprint: | Sharding NYC 2023-05-15, Sharding NYC 2023-05-29 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 20 | ||||||||||||||||
| Description |
|
When the transaction API was made to use an InlineExecutor, this inadvertently broke how cancelation works for it. Previously, the transaction ran on a separate thread from the caller's, so the caller would stop waiting on interrupt, cancel the transaction, then return the error code it was interrupted with. Now the transaction runs on the caller's thread, so it won't stop waiting on interruption, and the API doesn't think to check for the caller's opCtx being interrupted, so it will ignore the interruption. Instead, the API should respect the caller being interrupted even when using a single thread via the InlineExecutor. |
| Comments |
| Comment by Githook User [ 15/May/23 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: (cherry picked from commit 52ecfb60254c6b0627bb0ae4c69b1cb8c46adf59) |
| Comment by Githook User [ 13/May/23 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: |