Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-37223

Invariant atClusterTime has been selected when creating new txn participant with snapshot read concern

    • 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.

            jack.mulrow@mongodb.com Jack Mulrow
            jack.mulrow@mongodb.com Jack Mulrow
            0 Vote for this issue
            2 Start watching this issue