-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Sharding 2021-12-27, Sharding 2022-01-10, Sharding 2022-01-24, Sharding 2022-02-07
-
3
- Make transaction participants do the following upon receiving a startTransaction statement with a txnRetryCounter:
- If the FCV is latest and the feature flag is enabled, attach supportTxnRetryCounter:true to the response to the startTransaction statement. After that, the transaction must continue to use that txnRetryCounter regardless of FCV or feature flag changes.
- Otherwise, attach supportTxnRetryCounter:false to the response for the statement if txnRetryCounter=0, or throw a TxnRetryCounterNotSupported error if txnRetryCounter>0.
- Remove InvalidOptions uassert for txnRetryCounter from initializeOperationSessionInfo().
- Remove the feature flag checks in op_observer_impl.cpp and transaction_coordinator_util.cpp, and make it such that txnRetryCounter is written to config.transactions and config.transaction_coordinators entries and transaction oplog entries if and only if it is initialized.
Then:
- Make mongos use the flag to determine if txnRetryCounter should be attached in future transaction statements.
- Add TxnRetryCounterNotSupported to the list of transient transaction errors so that mongos attaches the TransientTransactionError label to the response to the command in the transaction that was internally retried with a non-zero txnRetryCounter.
- depends on
-
SERVER-61085 [Upgrade/downgrade] Do not persist txnRetryCounter if value is default
- Closed
- is depended on by
-
SERVER-61089 [Upgrade/downgrade] Make mongos use supportTxnRetryCounter
- Closed
- is duplicated by
-
SERVER-61089 [Upgrade/downgrade] Make mongos use supportTxnRetryCounter
- Closed