Skip to content

Ability to set timeout for transactions was implemented #2401

Open
@TarantoolBot

Description

@TarantoolBot

Product: Tarantool
Since:
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_txn_management/begin/
https://www.tarantool.io/en/doc/latest/dev_guide/reference_capi/txn/
SME: @ EvgenyMekhanik
Peer reviewer:

Details

Previously transactions are never closed until commit or rollback.
Timeout for transactions was implemented after which they are rolled
back. For these purpose, in box.begin the optional table parameter
was added. For example if user want to start transaction with timeout
3s, he should use box.begin({timeout = 3}). Also was implement new
configuration option box.cfg.txn_timeout which determines timeout for
transactions, for which the timeout was not explicitly set. By default
this option is set to infinity (TIMEOUT_INFINITY = 365 * 100 * 86400).
Also in C API was added new function to set timeout for transaction -
box_txn_set_timeout.
Requested by @EvgenyMekhanik in tarantool/tarantool@a76eb6e.

To-Do

  • Add timeout parameter to the description of box.begin
  • Add box_txn_set_timeout here

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.10featureA new functionalityreference[location] Tarantool manual, Reference partserver[area] Task relates to Tarantool's server (core) functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions