-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.1.8
-
Component/s: None
-
None
-
ALL
-
Sharding 2019-04-08, Sharding 2019-04-22, Sharding 2019-05-06
SERVER-37344's ticket description says:
a shard that receives 'recoverTransaction' returns NoSuchTransaction if the shard does not know about the transaction. otherwise, if the decision has been made, returns the decision; *if the decision has not been made, decides to abort.*
And the server design also says:
If the client is unable to reach the original router after having attempted to send commitTransaction to the original router, the client can send commitTransaction to a different router.
Doing so will never initiate committing the transaction. *Instead, the recovery token in the request will be used to try to abort the transaction if a decision to commit has not already been made*, otherwise to recover the transaction's outcome.
However the implementation of SERVER-37344 says:
commit recovery is best effort. If coordinateCommit was never sent to the coordinator, the recovery commit will timeout waiting for it.
So I think the current implementation is incomplete. The abort optimization is important because it prevents applications from blocking for 60 seconds (or transactionLifetimeLimitSeconds) when the original commit attempt is lost.
CC: renctan.
- duplicates
-
SERVER-39349 Recovering the state of a completed single-shard transaction should not block
- Closed
- related to
-
SERVER-37344 Implement recovery token for retrying a commit command on a different mongos
- Closed
-
SERVER-39349 Recovering the state of a completed single-shard transaction should not block
- Closed