[SERVER-37223] Invariant atClusterTime has been selected when creating new txn participant with snapshot read concern Created: 20/Sep/18  Updated: 29/Oct/23  Resolved: 09/Oct/18

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

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

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-10-08, Sharding 2018-10-22
Participants:

 Description   

Mongos tracks shard participants in a transaction using participant objects created and then retrieved before when requests are sent to a shard in a transaction context. The implementation of snapshot read concern assumes an atClusterTime has been selected for the transaction by the time any shards are targeted, but there is currently no invariant that this is true because cluster abort sends abort to all shards in the cluster, not just those involved in the transaction. So if cluster abort is the first statement in a sharded transaction, it will incorrectly create participants without selecting an atClusterTime.

OnceĀ SERVER-36589 has been completed, cluster abort will only target shards that have been successfully contacted in the transaction, so the invariant that a cluster time must have been chosen can be added.



 Comments   
Comment by Githook User [ 09/Oct/18 ]

Author:

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

Message: SERVER-37223 Invariant sharded txns with snapshot read concern select atClusterTime before creating a participant
Branch: master
https://github.com/mongodb/mongo/commit/3dc5e5979bc9a4a914b0a479e88e70078bd02552

Comment by Githook User [ 09/Oct/18 ]

Author:

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

Message: SERVER-37223 Place readConcernArgs on opCtx for subsequent statements in sharded transactions
Branch: master
https://github.com/mongodb/mongo/commit/f2254e26b9c7bdd94e4e6613ef5a20302ecc855e

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