Repository navigation
fix(dataset): refresh manifest naming before stale writer commits - #11521
Conversation
There was a problem hiding this comment.
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.
Xuanwo
left a comment
There was a problem hiding this comment.
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.
|
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. |
|
Blocked: At head Please rerun the failed jobs once Maven Central accepts downloads. Alternatively, rerun with an available Maven dependency cache or an approved mirror. |
There was a problem hiding this comment.
✅ 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.
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.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| ARead: Location from catch-up → Scheme selection and retention.
Snapshot: 3aaaa94