Skip to content

fix(dataset): refresh manifest naming before stale writer commits - #11521

Merged
Xuanwo merged 2 commits into
mainfrom
gatekeeper/fix-11513-1
Nov 30, 2026
Merged

Xuanwo merged 2 commits into
mainfrom
gatekeeper/fix-11513-1

Conversation

@lance-gatefixer

@lance-gatefixer lance-gatefixer Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #11513

A writer opened before migrate_manifest_paths_v2() retains its V1 naming scheme. Migration renames files without advancing the version, so transaction catch-up can leave that cached scheme unchanged and the next commit invisible to fresh readers.

Refresh a cached V1 scheme using the authoritative location already observed by transaction catch-up or conditional-commit validation when the read and write handlers and stores match. Catch-up includes the current V1 version in its existing listing, so an up-to-date V1 writer needs only one history scan. Once V2 is observed, retain it across retries.

When the read and write bindings differ, or a strict overwrite skips catch-up, resolve the latest location through the write handler. This does not require the writer’s historical manifest to remain available. V2 writers keep their existing path. Migration still requires pausing writes until it finishes.

The extended migration test covers current and older stale configuration writers plus a strict overwrite, with two fragments. It checks V2 publication, fresh-reader visibility, preserved data, and the complete version history. The two configuration-writer cases failed the V2 naming assertion against the original commit code.

Additional regressions count requests for five V1 manifests across three listing pages, covering up-to-date, catch-up, and conditional commits. They also cover V2 retries with matching and separate write bindings, and strict overwrite after pruning the writer’s historical manifest. Six cases fail against the prior implementation: duplicate V1 scans take six requests instead of three, and retries repeat the latest-location lookup.

Validation:

  • cargo test -p lance-table-runtime --lib commit::: 153 passed.
  • Focused Lance migration, conditional restore, transaction catch-up, and low-I/O tests: 10 passed.
  • cargo fmt --all.
  • cargo clippy --all --tests --benches -- -D warnings.

Change walkthrough

flowchart LR
    A[Commit attempt] --> B{V1 scheme?}
    B -->|Yes| C{Reusable observed location?}
    B -->|No| F[Publish manifest]
    C -->|Yes| D[Remember scheme]
    C -->|No| E[Resolve latest location]
    E --> D
    D --> F
    F -->|Retry| A
Loading

Read: Location from catch-up → Scheme selection and retention.

Snapshot: 3aaaa94

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

@github-actions github-actions Bot added the bug Something isn't working label Nov 26, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 26, 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.

The commit-handler lookup addresses migration without a version bump, including strict overwrite. On a table that still uses V1 naming, resolve_latest_location can list the whole _versions/ directory on lexically ordered storage. An ordinary commit can now do that after conflict catch-up has already listed the same history. Conditional commits also discard the ManifestLocation from latest_manifest(), and a retry after observing V2 starts from the original V1 flag again.

Could you reuse the authoritative location when the handler and store match, retain an observed V2 scheme across retries, and avoid the second full listing on an up-to-date V1 table? Please cover the request count for a V1 history spanning multiple listing pages, while keeping strict overwrite correct when the writer’s historical manifest has been pruned.

@lance-gatefixer

Copy link
Copy Markdown
Contributor Author

Addressed in 3aaaa94. Ordinary and conditional commits reuse their authoritative location when the read and write handlers and stores match; catch-up includes the current V1 location without loading its transaction. Observed V2 naming persists across retries. Strict overwrites still resolve the latest location; the pruned-history regression reports a commit conflict without publishing V1.

The paginated V1 regression now takes three listing requests instead of six. Validation passed: 153 runtime commit tests, ten focused Lance tests, formatting, and Clippy.

@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 26, 2026
@lance-gatefixer

Copy link
Copy Markdown
Contributor Author

Blocked: Build and Test with Java 25 cannot resolve a Maven plugin because Maven Central is rate limiting downloads.

At head 3aaaa94e44303f27547df1691f965c1923721f55, the failed job received HTTP 429 while downloading org.apache.maven.plugins:maven-jar-plugin:3.0.2, exhausting four attempts before compilation or tests. I inspected the job and failure logs; the native JNI build succeeded. This is an external dependency download failure, so no repair code change or base merge is warranted.

Please rerun the failed jobs once Maven Central accepts downloads. Alternatively, rerun with an available Maven dependency cache or an approved mirror.

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

The stale-writer fix for #11513 remains sound. The follow-up removes duplicate V1 history scans and retains V2 across retries while preserving write-handler authority. Local regressions cover paginated listings, separate write bindings, pruned history, and fresh-reader visibility. Migration still requires pausing other operations until it completes.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 26, 2026
@Xuanwo
Xuanwo merged commit a30f263 into main Nov 30, 2026
50 of 54 checks passed
@Xuanwo
Xuanwo deleted the gatekeeper/fix-11513-1 branch November 30, 2026 12:24
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: a writer opened before manifest migration can publish a V1 manifest that fresh readers miss

1 participant