Registry Mirror
Skip to content

Conversation

@brendanclement

@brendanclement brendanclement commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Currently, adding a storage base with an existing ID could silently redirect file references and break reads, including during concurrent commits.

This PR rejects duplicate explicit base IDs on all tables, extending the existing managed-blob protection.

UpdateBases refused an explicit base ID that was already registered only on
tables with managed blobs. On other tables the new base replaced the existing
binding, so every data, deletion and index file stored through that ID
resolved to the new location: the new version was published, and reading the
existing rows failed with not-found errors. The same happened when a
concurrent commit had been assigned that ID, because conflict resolution only
compares IDs that both transactions named.

Refuse an explicit ID already in the manifest on every table, with the
existing managed-blob error. ID 0 still asks for an unused ID, unused explicit
IDs are still accepted, and the name and path checks are unchanged.
@github-actions github-actions Bot added the bug Something isn't working label Oct 12, 2026
@brendanclement
brendanclement marked this pull request as ready for review October 12, 2026 19:40

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 12, 2026
@wjones127 wjones127 added the priority: high Issues that are high priority (for LanceDb, the organization) label Oct 19, 2026

@geruh geruh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM I like the check at manifest construction time! Just left a small nit, nothing blocking. thanks 🙌!!!

async fn test_add_bases_refuses_a_base_id_in_use() {
let test_dir = TempStrDir::default();
let uri = format!("{}/primary", test_dir.as_str());
let base = |id, name: &str| {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smol nit: this is duplicated setup with the other added test

);
}

/// Files refer to their base by ID, so binding an ID already in use to another

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: do we need this comment? feels like the test name already explains it, and we have the reasoning in manifest_build file.


/// Conflict resolution compares only IDs both transactions named, so an
/// explicit ID that a concurrent commit assigned is refused when the rebased
/// manifest is built.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this one can stay but it also repeats the logic a bit

@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 24, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Gate recommendation: approve.

Rejecting ID reuse while assembling the current manifest closes both the direct overwrite and concurrent allocation paths before publication. The regressions verify that rejected additions preserve the version, base bindings, and existing rows, while unused explicit IDs and automatic allocation remain valid.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 24, 2026

@Xuanwo Xuanwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: removes the managed-blob-only guard so rebinding any registered base ID is refused everywhere - files resolve through base IDs, so an unbounded rebind redirects existing data/deletion/index files. ID 0 assignment, unused explicit IDs, and name/path checks are unchanged. Tests cover direct rebind refusal with dataset invariants intact and the stale-handle concurrent-commit case. CI green; approving.

@Xuanwo
Xuanwo merged commit 53313cd into lance-format:main Oct 24, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance. priority: high Issues that are high priority (for LanceDb, the organization)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants