Ability to set timeout for transactions was implemented
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
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 https://github.com/tarantool/tarantool/commit/a76eb6ef5fbd136352d01d8e62c1e8429979201a.
To-Do
- Add
timeoutparameter to the description ofbox.begin - Add
box_txn_set_timeouthere
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked box.begin reference and C API transaction documentation. Add the documented timeout parameter for box.begin and the box_txn_set_timeout entry, then verify both pages explain the implemented behavior and link correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100