Schema transition reference

Transition kinds, states, control fields, endpoints, and terminal outcomes.

This page describes the administrative projection of durable online schema work. It is a reference for operators and tooling authors.

Kinds

transition_kindLogical resultPhysical protocol
index_buildA unique or non-unique index becomes readyBase scan, captured mutation deltas, catch-up, optional uniqueness validation
column_replacementA stable logical column points to a new physical representationStrict conversion backfill, foreground dual-write, validation, atomic swap
constraint_validationA constraint becomes validEnforce new writes, scan historical rows, validate, publish

Constraint validation currently supports not-null tightening.

States

stateMeaningForeground behaviour
waitingDurable prerequisites are not all readyNo obligation for this transition is installed
buildingBase scan or backfill is runningDeltas, dual-writes, or checks follow the active write protocol
catching_upCaptured index mutations are being replayedIndex deltas continue to be appended
validatingFinal checks or publication are in progressA short finalization gate may reject affected writes
readyLogical result publishedNew binding and planning can use it
failedTerminal validation or protocol failurePartial artifacts are queued for cleanup
cancelledTerminal operator cancellationObligations are removed and partial artifacts are queued for cleanup

The state set is shared by all kinds. A kind can skip states that its protocol does not need.

Control object

{
  "kind": "transition",
  "transition_id": "tr42",
  "object_id": "column:2",
  "transition_kind": "column_replacement",
  "state": "building",
  "generation": 6,
  "prerequisites": ["tr41"],
  "retained_work_state": "normal",
  "rows_scanned": 32000,
  "applied_delta": 0,
  "delta_lag": 0
}
FieldPresenceContract
kindRequiredAlways transition
transition_idRequiredStable durable identity for this work
object_idRequiredStable logical identity of the index, column, or constraint being produced
transition_kindRequiredOne protocol kind from the table above
stateRequiredCurrent durable lifecycle state
generationRequiredVersion of this transition record's state and progress
prerequisitesRequiredTransition IDs that must publish ready before activation
retained_work_stateRequiredAdvisory normal, degraded, or write_gated pressure
last_errorOptionalTerminal or most recent worker diagnostic
rows_scannedRequiredAdvisory count of rows scanned
applied_deltaRequiredAdvisory count or sequence of captured index mutations applied
delta_lagRequiredAdvisory remaining captured index work

generation is not the canonical schema revision, an object definition generation, a table write-protocol generation, a data position, or the worker owner epoch. Owner epochs and physical SlateDB positions are internal.

Endpoints

Method and pathBehaviourErrors
GET /schema/transitionsCoherent list, including retained terminal records; optional kind and state filtersInvalid filters are rejected
GET /schema/transitions/{transition}Coherent observation of one transition404 when unknown
POST /schema/transitions/{transition}/cancelAtomic cancellation and cleanup scheduling404 unknown, 409 publication race, 422 terminal work that cannot be cancelled

List and get never claim a worker or advance progress. Cancellation cannot be interleaved with application statements in a PIR program.

Terminal outcomes

ready, failed, and cancelled are terminal.

  • ready means the logical result was published atomically. Delete or change that object through the ordinary schema workflow.
  • failed means Rad preserved the diagnostic and did not publish an invalid result. Correct the data or choose a supported target before planning again.
  • cancelled means operator intent won before publication. Repeating cancel is safe and returns the same outcome.

Detailed worker state can be compacted after physical cleanup. Rad retains a stable terminal summary and failure diagnostic. A diagnostics retention pin can delay that compaction, though no public pin-management workflow is documented yet.