lance-format / lance-format/lance
Commit precondition on cells not changing.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.1k
- Forks
- 852
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 272
Description
Some write transactions only want to commit if some other fields, such as those read, have no changed concurrently. For example, if you are computing a column y based on a column x, you don't want to commit the new values for y if column x has concurrently changed, since that would place stale values.
Add a precondition onto the commit. Should pass field ids to choose columns, and RowAddressTreemap to specify which rows. There could potentially be multiple pre-conditions. Support for passing row ids (stable row ids) is left for a future change.
let rows_covered = RowAddressTreeMap::from(100..200);
CommitBuilder::new(dataset)
.with_precondition(Precondition::cells_unchanged([3, 4], rows_covered))
.execute(transaction)
.await?
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 tracing CommitBuilder::execute and the transaction commit path, then inspect Precondition and RowAddressTreeMap usage. The work is complete when cells_unchanged can accept field IDs and covered rows, supports multiple commit preconditions, and prevents committing when those cells changed concurrently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100