Skip to content

fix: move inline transaction to a new manifest field - #9482

Merged
wjones127 merged 6 commits into
lance-format:mainfrom
wjones127:fix/inline-transaction-field-9454
Oct 6, 2026
Merged

wjones127 merged 6 commits into
lance-format:mainfrom
wjones127:fix/inline-transaction-field-9454

Conversation

@wjones127

@wjones127 wjones127 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

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::Unknown instead of erroring. Conflict resolution treats Unknown as 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:

  • Operation has a new Unknown variant, so exhaustive matches need an arm for it. The variant is #[non_exhaustive], so it can only be matched (Operation::Unknown { .. }), not constructed, outside lance-table.
  • From<&Transaction> for pb::Transaction and format::Transaction are now TryFrom, failing on Operation::Unknown.

Not included

index_section has the same eager-decode hazard; it will be handled separately in the same way.

🤖 Generated with Claude Code

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]>
@github-actions github-actions Bot added A-java Java bindings + JNI A-format On-disk format: protos and format spec docs A-namespace Namespace impls format-change A change to the format spec, which requires a vote. Remove if minor (e.g. fixing typo). bug Something isn't working labels Sep 22, 2026
wjones127 and others added 3 commits September 22, 2026 15:25
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]>
@wjones127
wjones127 marked this pull request as ready for review September 22, 2026 22:57
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

Format specification vote

This 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

Approvals @Xuanwo, @westonpace, @jackye1995 (3/3)
Latest commit approved by @Xuanwo, @westonpace, @jackye1995
Vetoes none
Voting period elapsed — ended Fri 2026-09-25 22:57 UTC (15:57 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 format-waived label to waive the vote for a trivial edit (typo, wording, formatting).

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

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.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 22, 2026

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

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?

@wjones127

Copy link
Copy Markdown
Contributor Author

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:

Txn file Field 21 Field 22 Old reader behavior Old writer behavior
x - - OK OK
x x - OK OK
- x1 - OK OK
x - x OK OK
- - x1 OK Fails with "does not have transaction file"

Footnotes

  1. This requires a writer feature flag FLAG_DISABLE_TRANSACTION_FILE ↩ ↩2

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]>
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 5, 2026

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

Ok, the fact that old readers are fine missing the tx file is what I was missing. All good here.

@wjones127
wjones127 merged commit 978362b into lance-format:main Oct 6, 2026
wjones127 added a commit that referenced this pull request Oct 29, 2026
…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]>
geruh pushed a commit to geruh/lance that referenced this pull request Nov 4, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-format On-disk format: protos and format spec docs A-java Java bindings + JNI A-namespace Namespace impls bug Something isn't working format-change A change to the format spec, which requires a vote. Remove if minor (e.g. fixing typo).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: readers before v12.0.0 fail to open a dataset whose inline transaction they cannot decode

4 participants