[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:
Backports
Depends
Related
related to SERVER-75676 Complete TODO listed in SERVER-75553 Closed
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: SERVER-77095 Fix canceling transaction API when using an InlineExecutor

(cherry picked from commit 52ecfb60254c6b0627bb0ae4c69b1cb8c46adf59)
Branch: v7.0
https://github.com/mongodb/mongo/commit/a4acfac247e565a4b44e1b05cfde64bde575d67c

Comment by Githook User [ 13/May/23 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-77095 Fix canceling transaction API when using an InlineExecutor
Branch: master
https://github.com/mongodb/mongo/commit/52ecfb60254c6b0627bb0ae4c69b1cb8c46adf59

Generated at Thu Feb 08 06:34:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.