timeout

var timeout: Duration

Default maximum time a transaction can run for.

The initial value is 15 seconds.

After this time, the transaction will abort. Note that this could be mid-commit, in which case the cleanup process will complete the transaction asynchronously at a later point.

Applications can increase or decrease this as desired. The trade-off to understand is that documents being mutated in a transaction A are effectively locked from being updated by other transactions until transaction A has completed (committed or rolled back). If transaction A is unable to complete for whatever reason, the document can be locked for this timeout time.