Repository navigation
docs(format): stabilize spilled row lineage - #9886
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.
|
Important Format specification voteThis PR modifies the Lance format specification, so it requires 3 binding +1 votes from PMC members (excluding the proposer), at least one of them on the latest commit, and a minimum 72-hour voting period, weekends excluded, before it can merge. Vote by approving this PR (+1) or requesting changes (−1, a veto). See the voting process. Approvals carry over across pushes, so a rebase or a typo fix does not send everyone back to re-vote. Whoever approves the latest commit is vouching that nothing substantive has changed since the earlier approvals; if something has, ask for fresh votes. Status: ⏳ Approvals met (3/3); voting period ends Thu 2026-10-15 00:00 UTC (Wed 17:00 PDT)
Updated automatically by the format-spec vote gate, which re-checks every 15 minutes — just voted? Re-check now (press Run workflow; leave the input blank to re-check every open format PR). A PMC member may apply the |
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The stability declaration preserves the existing wire layout, bit-11 compatibility fence, V2-only storage, and table opt-in. Reading existing spilled lineage remains independent of the placement setting. After this specification completes its format vote, #9802 should follow to enable unconditional library support.
westonpace
left a comment
There was a problem hiding this comment.
Restoring my approval vote
|
@jackye1995 Would you vote on this? Also, we'll take the closing date from the original #9800 |
Setting `lance.row_lineage.spill=true` currently does nothing in a release build unless `LANCE_ENABLE_UNSTABLE_SPILLED_ROW_LINEAGE` is also set. This makes bit 11 supported in every build and lets table configuration alone control new spills. Readers continue to load existing spilled sequences after spilling is disabled. The default stays off, the inline budget stays 200 KiB, and V1 files stay inline. `FLAG_SPILLED_ROW_LINEAGE` replaces the unstable name, which remains as a deprecated alias. The unused environment-variable constant and support helper are removed. The benchmark no longer requires the env var. Extends the existing tests for absent/false configuration, the default threshold, and disabling spill before a cold reopen and a compaction back to inline. The deferred-remap matrix case checks its independent FRI gate in each build profile. Includes the accepted format specification from #9886, which satisfies the storage-contract prerequisite for unconditional runtime support. Compaction tests use the stable flag name so integration with main does not fail on deprecation warnings. Validation on head `79a7d854b`, based on main `173ab9fa3`, with Rust 1.98.1 on macOS arm64 and the spill environment variable unset: - `cargo fmt --all` and `cargo clippy --locked --all --tests --benches -- -D warnings` pass. - All 31 feature-flag tests pass in both debug and `release-with-debug`; the public flag doctest also passes. - Both recorded-move compaction cases with spilled lineage and all 56 debug spill tests pass, with no ignored tests. Refs #9250; follows #9791 and #9886.
Re-proposes #9800 after #9885 reverted its premature merge. The file changes are identical; this PR restarts the format vote.
Spilled row lineage has readers, writers and the operation matrix from #9791, but the spec still marks it as unreleased. This declares the existing format stable, names bit 11
FLAG_SPILLED_ROW_LINEAGE, and states that disabling future spills does not disable reads of existing spilled sequences.The wire layout, bit value, V2-only boundary and table opt-in stay unchanged. The runtime change is in #9802; this PR changes only format documentation and protobuf comments. The first library release with unconditional support will be recorded once that implementation lands.
Validation:
python3 ci/check_proto_comments.py protos/fragment_metadata.proto,git diff --check, and the repository's typos and proto-comment hooks pass.Historical benchmark: inline vs spilled
The 400,000-row smoke run reported in #9340 compared inline and spilled lineage within the same implementation. These are historical results for the storage trade-off; performance gains against the current head of this specification PR have not been measured.
Configuration: x86 r8i.8xlarge, local filesystem,
release-with-debug, 2 fragments x 200,000 rows, andBENCH_INLINE_MAX_BYTES=0to force spilling. Each arm ran once; timing rows report medians of samples within that run.shuffledrewrites rows in random physical order before compaction;deletedcompacts after deletions. Lower is better for every metric below.Sizes are MiB, matching the benchmark's formatter; #9340 labeled them MB. Reported speedups and size reductions use unrounded values; slowdown and growth factors above are approximate.
The main benefit in this run is smaller manifests and cheaper open/commit work for shuffled lineage. Full-table row-ID index construction stays about the same. The cost moves to the first sequence read and to larger compaction output, so the open speedup is not an end-to-end query speedup.
Scope: “cold” means a fresh Lance session with its caches disabled, without evicting the OS page cache. Append timing covers the commit only, excluding data-file writes. This single run does not establish multi-run variance, remote-storage performance, or behavior under the default 200 KiB budget. The later 2 x 2,000-row run for #9802 validates functionality with the env var unset; it is not another performance measurement. The table above comes from #9340's published summary; the original run SHA and raw log were not recovered.
Refs #9250; follows #9791.