[SERVER-39124] Mongos should send abort to cleared participants between retries of transaction statements Created: 22/Jan/19  Updated: 29/Oct/23  Resolved: 29/Jan/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.1.8

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: ShardedTxn:RouterSupport
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2019-01-28, Sharding 2019-02-11
Participants:
Linked BF Score: 17

 Description   

When mongos encounters an error during a transaction, if the error is "retryable" (e.g. snapshot error on first client statement), it will remove newly added participants from the participant list and retry the request, relying on shards implicitly aborting transactions started for the first attempt before servicing the new one.

If the operation on the router is killed (e.g. by killOp) after it clears pending participants but before it re-targets, the router will not know to send abort to the shards targeted by the first attempt, which may leave transactions open. To handle this and to simplify the contract around router retries, the router should instead send abortTransaction to all shards it removes from the participant list (waiting for all responses) before retrying. The ability for a shard to start a new transaction at the same number as an in-progress one should also be removed.



 Comments   
Comment by Githook User [ 30/Jan/19 ]

Author:

{'email': 'jack.mulrow@mongodb.com', 'name': 'Jack Mulrow'}

Message: SERVER-39124 Mongos should abort cleared participants between retries of transaction statements
Branch: master
https://github.com/mongodb/mongo/commit/7380d6e9ad0a90f6c5758b52d166d4069dd5a502

Generated at Thu Feb 08 04:51:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.