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

TransactionCoordinator may block acquiring WiredTiger write ticket to persist its decision, prolonging transactions being in the prepared state

    • Fully Compatible
    • ALL
    • v5.1, v5.0, v4.4, v4.2
    • Execution Team 2021-11-29

      The TransactionCoordinator performs an update to the config.transaction_coordinators on the local shard to write down its commit or abort decision for the cross-shard transaction. During this step of the two-phase commit coordination, the cross-shard transaction is in the prepared state on the participant shards. This means other multi-statement transactions can hit a prepare conflict while waiting for the former cross-shard transaction to commit or abort. These other multi-statement transactions will block while holding storage resources, including a WiredTiger write ticket. It is therefore possible for all WiredTiger write tickets in the system to be temporarily exhausted due to a prepare conflict. It would be less disruptive to the system if the TransactionCoordinator could still write down its decision locally in this situation so that it can more rapidly deliver the decision to the participant shards and clear their prepared state.

      Note that after transactionLifetimeLimitSeconds have elapsed (defaults to 1 minute), the multi-statement transactions holding the WiredTiger write tickets will be aborted and will release their ticket and enable the TransactionCoordinator to successfully acquire it.

            Assignee:
            josef.ahmad@mongodb.com Josef Ahmad
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: