Repository navigation
fix: move inline transaction to a new manifest field - #9482
Conversation
Lance v1.0-v11.0 eagerly decode the inline transaction (manifest field 21) and fail to open the version if its operation is unknown to them. Write the section to field 22 instead, keep reading 21, and decode unrecognized operations as `Operation::Unknown`, which conflicts with everything and cannot be re-encoded or committed. Fixes lance-format#9454 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ages Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Keeping Operation exhaustive means a new operation is a compile error in every conflict-resolver match, rather than silently hitting a wildcard. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
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: ✅ Vote passed — 3 PMC approvals, voting period elapsed
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.
Moving the inline offset to field 22 addresses the released-reader failure while preserving field-21 fallback, and the Unknown sentinel closes the forward-compatibility path conservatively: it cannot be committed or re-encoded and conflicts with every known operation. The implementation and compatibility coverage support that contract.
Please mark this PR with the breaking-change label.
westonpace
left a comment
There was a problem hiding this comment.
How do newer writers and older readers work with this change? Newer writers will not write transaction_section_deprecated. Will older readers be ok with this being absent?
New writers will not write the deprecated field. Old readers will then always look for the separate file, but they won't fail if they don't find one. Transaction files didn't always exist so it's been expected from the beginning they might be missing. So there are a few different situations:
Footnotes |
main claimed Manifest field 22 for fragment_tree (lance-format#9060), so the inline transaction section moves to field 23. Also handles Operation::Unknown in the new frag-reuse gate and switches new pb::Transaction::from call sites to try_from. Co-Authored-By: Claude Opus 5.5 <[email protected]>
westonpace
left a comment
There was a problem hiding this comment.
Ok, the fact that old readers are fine missing the tx file is what I was missing. All good here.
…prose Since #9482 the inline transaction is in a manifest field older readers ignore, so a CompositeOperation no longer prevents opening a table; only readers before v14.0.0 decoding the transaction itself fail. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…prose Since lance-format#9482 the inline transaction is in a manifest field older readers ignore, so a CompositeOperation no longer prevents opening a table; only readers before v14.0.0 decoding the transaction itself fail. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lance v1.0 through v11.0 decode the inline transaction (manifest field 21) while opening a version, and fail if it contains an operation they don't know. So any new operation type written inline makes that version unopenable for older readers. This PR moves the inline transaction to a new field 23, which those readers ignore. Field 21 is still read, so existing datasets are unaffected, but it is never written again.
It also makes transaction decoding total, so this cannot recur: a transaction whose operation is unrecognized now decodes as
Operation::Unknowninstead of erroring. Conflict resolution treatsUnknownas conflicting with everything, and it cannot be re-encoded or committed.Fixes #9454
This PR also documents the new field and the handling of unknown operations in the format spec (
docs/src/format/table/transaction.md).Breaking changes
For Rust users of
lance-table/lance:Operationhas a newUnknownvariant, so exhaustive matches need an arm for it. The variant is#[non_exhaustive], so it can only be matched (Operation::Unknown { .. }), not constructed, outsidelance-table.From<&Transaction>forpb::Transactionandformat::Transactionare nowTryFrom, failing onOperation::Unknown.Not included
index_sectionhas the same eager-decode hazard; it will be handled separately in the same way.🤖 Generated with Claude Code