Skip to content

fix(rowids): move the row id index to the index cache - #10772

Merged
Xuanwo merged 4 commits into
mainfrom
yang/rowid-index-cache
Nov 6, 2026
Merged

Xuanwo merged 4 commits into
mainfrom
yang/rowid-index-cache

Conversation

@BubbleCal

@BubbleCal BubbleCal commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

RowIdIndex can be rebuilt on each take when it exceeds the metadata cache budget, even when the index cache has room. Store the whole-dataset lookup in the dataset index cache so admission, charged bytes and eviction use the index budget. Preserve the dataset namespace, manifest version/etag and deletion mode in its identity.

Move the internal key alongside the other index-cache keys and update compaction and ANN cache-count assertions. Tests cover cache ownership/accounting, disabled and undersized index budgets, eviction/reload, and snapshot isolation.

Validation on Linux x86_64 with pinned Rust 1.98.1:

  • 175 related Rust tests pass on d4bc3b59e: row IDs, take, index-cache keys and distributed compaction. All four ANN deletion cases and three strengthened cache-budget cases pass on 001378098.
  • The metadata-disabled regression fails on the main baseline and passes with this change.
  • cargo fmt --all -- --check and cargo clippy --locked --all --tests --benches -- -D warnings pass on 001378098.
  • Matched S3 validation completed for cold and warm resolver/take requests over 10M shuffled rows in 10 fragments. All independent row-address and payload oracles passed across 16 process profiles, including cache accounting under constrained and sufficient metadata budgets.

The S3 comparison used main baseline 756aa39bc4a367a77b0c7dddb0f567eba3444a90 and measured head d4bc3b59ea18a5e09c1f07445fdf4745297f308c, on one c7i.8xlarge with release-with-debug, matched request pools and memory limits. The subsequent commits only change tests and CI. Final-head performance has not been remeasured; no numeric speedup is claimed here.

The Rust macOS job uses macos-15 and its default Xcode because GitHub retired the macOS 14 image. Test commands are unchanged. YAML syntax, diff checks and commit hooks pass; Rust sources match the tested head.

Applicable CI checks pass on 102cec7e7, including macOS, Linux x86_64/ARM, Windows builds, Python/Java integration, and Arrow ordering compatibility. Lance Gatekeeper is waiting for the draft to be marked ready.

@github-actions github-actions Bot added the bug Something isn't working label Nov 5, 2026
@github-actions github-actions Bot added the A-ci CI / build workflows label Nov 5, 2026
@BubbleCal
BubbleCal marked this pull request as ready for review November 6, 2026 02:03

@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 repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@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.

Using the index budget fixes repeated row-id lookup rebuilds under metadata-cache pressure while preserving snapshot and deletion semantics. All 175 focused local tests passed; no blocking issues found.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 6, 2026
Xuanwo added a commit that referenced this pull request Nov 6, 2026
GitHub Actions retired all macOS 14 runner images on 2026-11-02. The
`mac-build` job in `rust.yml` still selected `macos-14`, so the current
`main` job was cancelled before a runner or any step was assigned:

-
https://github.com/lance-format/lance/actions/runs/42107380260/job/127525657791
- Annotation: `The configuration 'macos-14-arm64-us-default' is not
supported`

This changes only that job to `macos-15`, which resolves to the
supported `macos-15-arm64` image. It also removes the obsolete
`Xcode_15.4.app` selection step: the macOS 15 image does not include
that Xcode, and the step only worked around a Rust backtrace issue in
the older default Xcode. The 60-minute timeout, `-p lance-io` build/test
commands, toolchain/cache/protoc steps, and every other job are
unchanged.

Provenance: this extracts the CI commit
`102cec7e7d311b3fe1a47218ffffa0afc8edfe49` from #10772, preserving
BubbleCal as the author. #10772 remains a separate draft feature PR;
this PR carries only the shared macOS runner prerequisite. No Rust,
dependency, or lockfile changes.

Co-authored-by: BubbleCal <[email protected]>
@Xuanwo
Xuanwo merged commit 76e522c into main Nov 6, 2026
51 checks passed
@Xuanwo
Xuanwo deleted the yang/rowid-index-cache branch November 6, 2026 02:46
yeung108 added a commit to yeung108/lance that referenced this pull request Nov 25, 2026
…he index cache

Since lance-format#10772, the row id index is inserted into the dataset's index
cache (get_row_id_index_with passes &dataset.index_cache), so cleanup's
invalidation must target the same handle. The retarget rides the merge
of upstream/main in the previous commit; this adds the focused
verification Xuanwo's review asked for: populate both with_deletions
variants of a stale version's row id index, assert they are resident in
the index cache before cleanup, then assert cleanup removes them. The
positive lookup distinguishes cached-and-reclaimed from never-cached.

Also restores the assert_lt import the merge dropped from the cleanup
tests module.

Co-Authored-By: Claude Code <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ci CI / build workflows bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants