[SERVER-66725] Make incoming retryable transactions abort conflicting transactions once Created: 24/May/22 Updated: 29/Oct/23 Resolved: 09/Jun/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc10, 6.1.0-rc0 |
| Type: | Improvement | 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 | ||||
| Backport Requested: |
v6.0
|
||||
| Sprint: | Sharding NYC 2022-05-30, Sharding NYC 2022-06-13 | ||||
| Participants: | |||||
| Description |
|
When a new retryable transaction runs on a mongod and a retryable transaction for the same client retryable write (ie same txnNumber in the session id) is active, the incoming transaction must wait for the existing transaction to complete, which happens via throwing a RetryableTransactionInProgress exception. This is meant to avoid a livelock if multiple routers are running the same client retryable write that requires retryable transactions, e.g. after a network error between a client and a mongos that leads the client to retry on a different mongos. A downside of this is if the router for the existing transaction has crashed or otherwise given up (e.g. after certain Interruption errors) the incoming transaction from the retry will wait for the existing transaction to time out. In practice, it is likely the original router has stopped running the transaction if a retry arrives, so the retry should interrupt the existing transaction. But to prevent livelocks if the original router is still running, only the first conflict should cause an interruption. |
| Comments |
| Comment by Githook User [ 09/Jun/22 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: (cherry picked from commit bc385b8dcb5b7a550cefaada9d44bc9ded5164de) |
| Comment by Githook User [ 09/Jun/22 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: |