Document cross-engine transactions
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Related dev. issue(s): https://github.com/tarantool/tarantool/issues/1803
Product: Tarantool
Since: 3.4
Root document: https://www.tarantool.io/en/doc/latest/platform/atomic/txn_mode_mvcc/#txn-mode-transaction-manager
SME: @ locker
Details
Scope:
- Remove the note "Currently, you cannot use several different storage engines within one transaction"
- Add the example and the description of the updates to "Examples with MVCC enabled and disabled"
Tarantool now supports mixing statements for different storage engines
in the same transaction, for example:
local memtx = box.schema.space.create('memtx', {engine = 'memtx'})
memtx:create_index('primary')
local vinyl = box.schema.space.create('vinyl', {engine = 'vinyl'})
vinyl:create_index('primary')
memtx:insert({1, 'a'})
vinyl:insert({2, 'b'})
box.begin()
memtx:replace(vinyl:get(2))
vinyl:replace(memtx:get(1))
box.commit()
Note, since accessing a vinyl space may trigger a fiber yield (to read
a file from the disk), MVCC must be enabled in memtx to make use of
the new feature:
box.cfg{memtx_use_mvcc_engine = true}
Requested by @ locker in https://github.com/tarantool/tarantool/commit/b9c5a1d9641081bca681e2d82fea96dc9398fdfa.
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 root document's transaction-manager section and the “Examples with MVCC enabled and disabled” section. Remove the outdated restriction, add the cross-engine transaction example, and document that memtx MVCC must be enabled when accessing vinyl; done means both sections describe the supported behavior accurately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100