Totally eliminate the table lock between reading and DDL operations
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
After https://github.com/pingcap/tics/issues/1162, (PR: https://github.com/pingcap/tics/pull/1736), we still need to hold a read lock on alter_lock for building the TableScan operation and decoding Raft data. After the TableScan operation built / Raft data decoded to Block, we release the alter_lock and only keep the drop_lock for reading/writing.
Normally, building TableScan operation, decoding Raft data, apply a single DDL operation does not block for a long time.
Need further Investigation on whether we can totally eliminate the alter_lock between reading/writing/DDL operations.
The main focus point between reading and DDL operations is the race problem https://github.com/pingcap/tics/pull/1736#discussion_r622055228. Reading data with a TableScan operation with an older schema is not supported by the DeltaTree engine.
Contributor guide
No contributing guide indexed for this repository
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 reviewing issue #1162, PR #1736, and the linked race discussion. Then trace how alter_lock and drop_lock protect TableScan construction, Raft decoding, and DDL application. Done requires determining whether alter_lock can be removed without permitting unsupported reads with an older schema, and documenting or implementing a safe resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100