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

Allow mongos to retry on snapshot errors received when starting a transaction

    • Fully Compatible
    • Sharding 2018-08-27, Sharding 2018-09-10, Sharding 2018-09-24

      Mongos should only retry on snapshot errors (SnapshotTooOld or SnapshotUnavailable) during the first statement in a cross-shard transaction. Each retry attempt should choose a new atClusterTime and once a global snapshot has been successfully established on all targeted shards, the atClusterTime used should be made immutable for the remainder of the transaction and used when targeting any new participants. If any future statements encounter a snapshot error, mongos should abort the entire transaction.

      If mongos exhausts its allowed retry attempts trying to establish a snapshot, the snapshot error returned to the client should have the TransientTransactionError label.

      Shards should always abort their local transactions on any snapshot error, since this implies snapshot level read concern and a cross-shard transaction with snapshot level read concern cannot continue if any targeted shard cannot provide a snapshot at the chosen global timestamp.

            Assignee:
            jack.mulrow@mongodb.com Jack Mulrow
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: