tarantool / tarantool/tarantool
Qsync perf optimizations
Open
Nobody has claimed this yet.
optimization
qsync replication
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 419
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 88
Description
This ticket is a set of optimizations which could speed up the synchronous transaction, and reduce slow down of the async transactions.
txn_journal_entry_new()in each statement dereferencesstmt->space->def->optsin order to check whether the space is sync. This is 3 pointer derefences and could be quite slow;txn_commit()has 3 checks for whether the transaction is sync: it takes TXN_WAIT_SYNC flags, + it checks is_sync boolean variable twice. First way to reduce number of checks - check is_sync only once and then handle async and sync transactions completely separately. Second way - keep track of sync space count in the schema. When it is 0, don't even try to check any sync flags.- <Add more optimizatons here>.
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 by locating txn_journal_entry_new() and txn_commit(), then trace how stmt->space->def->opts, TXN_WAIT_SYNC, and is_sync are used for synchronous and asynchronous transactions. The issue leaves additional optimizations open; done means the selected changes preserve transaction behavior while reducing the relevant sync checks and improving the stated performance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- databases, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100