[SERVER-63875] Move TransactionWithRetries::runSync executor futures into details::Transaction Created: 22/Feb/22 Updated: 29/Oct/23 Resolved: 23/Feb/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc0 |
| 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 | ||||
| Sprint: | Sharding 2022-03-07 | ||||
| Participants: | |||||
| Linked BF Score: | 133 | ||||
| Description |
|
Currently, the transaction API's TransactionWithRetries::runSync method will create ExecutorFutures to call methods on its private member _internalTxn, which actually runs the transaction's commands. These futures don't guarantee the TransactionWithRetries will be in scope when they run though, potentially leading to errors. Instead, TransactionWithRetries shouldn't use an executor at all and leave that to the Transaction class, which is already a shared pointer and can extend its lifetime with shared_from_this(). |
| Comments |
| Comment by Githook User [ 23/Feb/22 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: |