Skip to content

Support rollback holes and persisted abort metadata in appendable objects #26344

Closed

Description

@jiangxinmeng1

Background

AppendMVCCHandle.GetVisibleRowLocked already computes rollback holes, but memoryNode.Scan, FillBlockTombstones, and CollectObjectTombstoneInRange discard them. Rollback also removes the corresponding AppendNode. Once append data is applied before commit, this leaves physical rows and PK-index entries without an MVCC owner.

The object format reserves SEQNUM_ABORT, but abort metadata is not supported end to end: object reads panic on it and appendable block reads load only commitTS.

Expected behavior

  • Keep rolled-back append ranges in the MVCC chain and mark them aborted.
  • Consume rollback holes in memory scans and tombstone collection.
  • Persist an abort column alongside commit timestamps for new appendable objects.
  • Filter aborted rows in objectio/blockio snapshot reads, persisted dedup and PK checks, tombstone scans, merge/flush input, logtail, WAL replay, publication, dump/restore, and custom object readers.
  • Read legacy commit-only objects with a missing abort column interpreted as false.

Design requirement

Introduce a shared special-column layout resolver based on object metadata. Consumers must not infer commitTS or abort from the last column or total column count.

Supported layouts must include:

  • rowid -> commitTS -> abort
  • commitTS -> rowid -> abort
  • legacy commitTS only

Acceptance criteria

  • Rolled-back physical rows retain an aborted AppendNode owner and are invisible to scans and dedup.
  • New appendable objects persist commitTS + abort; legacy objects remain readable.
  • Aborted data and tombstone rows do not reach merge output, logtail publication, snapshot reads, or restored dump-table data.
  • WAL V1 remains readable and the new version preserves aborted state.
  • Unit, DB flush/replay, and race tests cover new and legacy formats.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions