-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
Sharding 2018-08-27
Some exceptions can be thrown by shards that trigger internal retries by the router, like stale config or snapshot too old. Because mongos is not allowed to change the transaction number, to allow internal retries participants must be modified to allow starting a new transaction at a transaction number they have already seen for a given session id. So upon receiving startTransaction=true with txnNumber N, the shard should abort any in-progress transactions with txnNumber <= N and begin a new transaction at N.
This behavior should be disallowed if the shard is in the commit, prepare, or prepare after abort state (or any state that indicates the shard has been involved in a two phase commit).
- has to be done before
-
SERVER-35707 Figure out the transaction abort state on re-targeting exceptions
- Closed
-
SERVER-36591 Allow mongos to retry on snapshot errors received when starting a transaction
- Closed
- is duplicated by
-
SERVER-36203 Unify error codes returned by mongod for requests with autocommit:false outside a transaction
- Closed
- related to
-
SERVER-36639 Disallow starting a new txn at active txn number if the shard has aborted after being prepared
- Closed