-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
Sharding 2018-10-08, Sharding 2018-10-22
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.