lance-format / lance-format/lance

Possible race condition between `cleanup_old_versions` and `commit_transaction`

Open
#3,718 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
7.1k
Forks
852
Avg merge
3d 18h
Merged PRs (30d)
272

Description

start: dataset has version 1

  1. commit_transaction checks out the latest version of the dataset, version 1
  2. other commits land, creating version 2 and 3
  3. cleanup_old_versions is called, removing old versions 1 and 2
  4. commit_transaction successfully writes a manifest for version 2, despite the latest version being 3.

This could be fixed by overwriting old manifests with 0 byte tombstones instead of deleting them.

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 by tracing the cleanup_old_versions and commit_transaction entry points through the version-manifest handling. Reproduce the sequence described in the issue, then verify that cleanup cannot allow a commit based on version 2 after version 3 exists; add coverage for the race if the repository has a suitable test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.