You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This spike adopts that doc as its starting point. The work here is to land
the doc in-tree, fill out its TODO sections (§4 catalog, §5 matrix,
§6 rules, §8 payloads, §11 migration), and resolve its open questions.
What to build
Design how conflict resolution works at the Action level rather than the
Operation level. The new system must detect conflicts and rebase using only
Action types and payloads — no higher-level operation intent.
Three design patterns from the doc anchor the rest of the work and must
be confirmed or revised in this spike:
Criterion-based targeting (§3.1) — actions targeting open sets carry
predicates over (fragment_ids, field_ids, ...), not identity lists.
Motivating case: Update on column X || concurrent AddIndex on column X.
Late binding of action output (§3.2) — payloads use FragmentTemplate
(no id) rather than Fragment. IDs assigned at apply time from manifest
counters. Rebase becomes a no-op for produced IDs.
Symbolic intra-transaction references (§3.3) — FragmentRef::ProducedBy { action_idx, output_idx }, resolved through TxnContext as the driver walks the action list. Pins compound-txn
dependencies to an ordered list, not a DAG.
These three together change the shape of the Action trait from the
current apply(&Manifest) + conflicts_with(&other) pair to a five-method
contract (reads/writes/validate/rebase/apply) plus a driver loop
that uses mask intersection to gate rebase. This is the most consequential
piece for #6450–#6453 to be designed against.
Catalog reconciliation (must do before #6451/#6452 land)
The milestone PRD's 14-action catalog and the design doc's §4 catalog
disagree on three concrete points. This spike must resolve them so
implementation issues design against the right shape:
Topic
Milestone PRD
Design doc §4
Resolution needed
Single-fragment updates
UpdateFragment(Fragment) (omnibus: deletion files, replaced columns, swap data files)
Split into UpdateDeletionVector, ReplaceFragmentColumns, RewriteFragments
Decide whether to split. If yes, migrate #6450's shipped UpdateFragment to UpdateDeletionVector (the only translation that landed — Delete — used it that way).
Index coverage
AddIndex / RemoveIndex only
Plus InvalidateIndexCoverage, RebindIndexCoverage, RegisterFragReuse
Decide whether to add the three coverage actions. Required to express open-set cross-resource cases (§3.1).
Compact distinction
RemoveFragments + AddFragments
RewriteFragments (asserts data equivalence; enables index salvage via RebindIndexCoverage)
Decide whether RewriteFragments warrants its own action.
Acceptance criteria
Land the design doc at rust/lance-table/design/action_based_conflict_resolution.md
§4 action catalog complete: enumerate all remaining actions (Append-only, AddIndex, DropIndex, UpdateConfig, Restore, ReserveFragments, Project, UpdateBases, Clone, DataReplacement, Merge), each with payload + read-set + write-set + commutativity notes
Three catalog reconciliation decisions above resolved and reflected in the doc
§5 conflict matrix filled in (N×N over the §4 catalog, cells C / X / R(n))
§6 rules written for every R(n) cell (detection predicate + resolution: rebase rewrite, fail, or auto-merge)
§7 Action trait shape ratified or revised; current Action::apply + conflicts_with deprecated path documented
§8 payload changes called out per action, including proto-breaking changes
§11 migration map: each existing check_*_txn in conflict_resolver.rs mapped to its action-level replacement (or flagged as not-yet-expressible)
Open questions in the doc (§§ "Open Questions") resolved or explicitly deferred with rationale
Parent PRD
Milestone: Action-based Transactions (UserOperation) — see milestone description for full PRD.
Discussion: #5960
Anchor design
A draft design exists on a prototype branch:
rust/lance-table/design/action_based_conflict_resolution.md.This spike adopts that doc as its starting point. The work here is to land
the doc in-tree, fill out its
TODOsections (§4 catalog, §5 matrix,§6 rules, §8 payloads, §11 migration), and resolve its open questions.
What to build
Design how conflict resolution works at the Action level rather than the
Operation level. The new system must detect conflicts and rebase using only
Action types and payloads — no higher-level operation intent.
Three design patterns from the doc anchor the rest of the work and must
be confirmed or revised in this spike:
predicates over
(fragment_ids, field_ids, ...), not identity lists.Motivating case: Update on column X || concurrent AddIndex on column X.
FragmentTemplate(no id) rather than
Fragment. IDs assigned at apply time from manifestcounters. Rebase becomes a no-op for produced IDs.
FragmentRef::ProducedBy { action_idx, output_idx }, resolved throughTxnContextas the driver walks the action list. Pins compound-txndependencies to an ordered list, not a DAG.
These three together change the shape of the Action trait from the
current
apply(&Manifest) + conflicts_with(&other)pair to a five-methodcontract (
reads/writes/validate/rebase/apply) plus a driver loopthat uses mask intersection to gate rebase. This is the most consequential
piece for #6450–#6453 to be designed against.
Catalog reconciliation (must do before #6451/#6452 land)
The milestone PRD's 14-action catalog and the design doc's §4 catalog
disagree on three concrete points. This spike must resolve them so
implementation issues design against the right shape:
UpdateFragment(Fragment)(omnibus: deletion files, replaced columns, swap data files)UpdateDeletionVector,ReplaceFragmentColumns,RewriteFragmentsUpdateFragmenttoUpdateDeletionVector(the only translation that landed — Delete — used it that way).AddIndex/RemoveIndexonlyInvalidateIndexCoverage,RebindIndexCoverage,RegisterFragReuseRemoveFragments+AddFragmentsRewriteFragments(asserts data equivalence; enables index salvage viaRebindIndexCoverage)RewriteFragmentswarrants its own action.Acceptance criteria
rust/lance-table/design/action_based_conflict_resolution.mdC/X/R(n))R(n)cell (detection predicate + resolution: rebase rewrite, fail, or auto-merge)Action::apply+conflicts_withdeprecated path documentedcheck_*_txninconflict_resolver.rsmapped to its action-level replacement (or flagged as not-yet-expressible)Out of scope
Blocked by
None — can start immediately.
Blocks
ReplaceFragmentColumns; depends on catalog)User stories addressed