Replies: 1 comment 2 replies
Generally, for format changes we vote on the specific spec changes. The protobuf changes are changes in the spec. The library changes can be considered separate an an implementation detail that doesn't need a vote (although seeing the library implementation can help build the case for the format changes). I'm -1 on adding the field to I'd be +1 on adding the field to |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
TL;DR
Let a Lance
Operation::Updatecommit atomically carry a smallMap<String, String>written into the manifest'stable_metadataalongsidethe row-level changes. (Mechanically the field lives on
Transactionsointernal write paths don't need to know about it — details in the PR.)
Today the same
UpdateMapexists insideOperation::UpdateConfigbut cannotride along with a data commit, forcing streaming writers into a two-commit
race. Draft implementation: #6255. This thread is about
whether the format should grow this, not how.
The problem
A streaming writer / sink wants one piece of durable state per commit —
a cursor, an offset, a consumed-range — and it needs that state to land
atomically with the rows produced by
Operation::Update. Lose the cursorafter landing rows → duplicates on restart. Land the cursor without the rows
→ gaps.
Operation::Updatealready is Lance's data-plane superset (remove + rewriteupdate,merge_insert, and by a broker-stylefold coordinator). What's missing is "... and record a cursor slot in the
same commit".
Lance today offers nothing that checks all three boxes of "atomic with the
Update / readable in O(1) / safe under concurrent writers":
transaction_properties_transactions/*)UpdateConfig.table_metadata_updatesSo every streaming workload on Lance either pays an O(N) startup scan or
races two commits. We've been carrying an out-of-tree patch and would rather
have the conversation upstream.
Value — what lands if this ships
All use cases are commits that pair an
Operation::Updatewith a smallmetadata write:
merge_insert(which producesOperation::Update) atomically records itsconsumer={id}: {range}:{unacks}slot. Restart re-readsdataset.metadatain zero extra I/O.
fragment changes into a single
Operation::Update, carrying the union oftheir cursor slots in one manifest write instead of two.
Operation::Update(merge_insert by pk, or update-by-predicate) gets aclean home for its offset/watermark.
Concurrent disjoint keys commute and fuse; overlapping keys or
replace:trueconflict — same semantics as the existing
UpdateConfigpath.Relationship to #5960
#5960 proposes a richer, more comprehensive metadata story across the
transaction. Strictly more capable than this; if it lands soon we don't need
this field at all.
Two honest framings to pick between:
a) Ship this now as a bridge. Streaming workloads on
Operation::Updateunblock today; when #5960 lands, this field either stays as the simple path
or gets aliased during a deprecation window.
b) Skip this, wait for #5960. If the comprehensive design is close
(weeks not months), the format commitment of an extra field isn't worth
the churn.
We'd carry the fork either way — the question for upstream is whether the
minimal version is worth merging in the meantime.
Prior art
Peer formats all have a same-shape slot — a transaction/snapshot-level string
map written atomically with the commit:
Snapshot.summary(Map<String,String>), part of theatomic snapshot commit.
CommitInfo.tagsper commit;SetTransactionactionspecifically for exactly-once sink offsets (
appId → version).HoodieCommitMetadata.extraMetadataon each timeline instant.This proposal is the minimal equivalent for Lance, scoped to the
Operation::Updatecommit path.Discussion questions
Regardless of how you vote, input on any of these would help us refine the
proposal (or decide to withdraw it):
there instead?
Operation::UpdateConfig.table_metadata_updates, or coexist long-term?Operation::Updatethat would want the sameatomic-metadata slot, strong enough to broaden the scope?
Vote
Per lance.org/community/voting, this
is a format spec change (touches
protos/transaction.proto):(not as a reply inside another comment), so concerns get their own thread
(binding)or(non-binding)All reactions