tarantool / tarantool/tarantool

Ensure that `struct applier` is not deleted util its in-fly txns are finished

Open
#10,030 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

refactoring replication
Dominant language
Lua
Stars
3.7k
Forks
419
Avg merge
1d 23h
Merged PRs (30d)
88

Description

Currently the applier txn processing doesn't seem to keep the applier object alive until all its txns are fnished. That could be the reason why in replica_txn_wal_write_cb() the trigger must go replica->applier->txn_last_tm instead of directly using the pointer at the applier owning this txn.

Need to investigate, whether appliers live as long as their txns. If they don't - make them. Then make applier directly assign its txn_last_tm without struct replica participation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with replica_txn_wal_write_cb() and trace ownership of struct applier, its in-flight transactions, and txn_last_tm. Determine whether an applier remains alive until all its transactions finish; done means the lifetime behavior is established and txn_last_tm no longer needs struct replica mediation if the investigation supports that change.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.