-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Sharding 2022-01-10, Sharding 2022-01-24, Sharding 2022-02-07
-
3
This is to handle the case where the external client retries retryable writes that are being executed using internal transactions. This is from the design:
To support such retries but avoid executing write statements within a retryable internal transaction more than once, upon seeing a startTransaction statement for a new internal transaction, a transaction participant will also check if there is an existing in-progress internal transaction for the write command that the new transaction corresponds to. If there is, it will throw a RetryableTransactionInProgress error. The error will be caught and cause the startTransaction statement to block until the existing transaction commits or aborts. If the existing transaction commits, a RetryableTransactionCommitted error will be thrown and the mongos will retry the transaction (with the original txnRetryCounter) to retrieve the original response. If the existing transaction aborts, a NoSuchTransaction will be thrown and the mongos will retry the transaction (with a higher txnRetryCounter).
- is depended on by
-
SERVER-58765 Test two routers running the same retryable write that requires internal transaction concurrently
- Closed