What it does
The evolve crate holds a persisted migration state machine over the schema service: begin, backfill, validate, promote, or roll back. It refuses breaking changes up front and never promotes a definition that failed validation. The server does not use it, so schema changes today replace the definition directly.
How it works
Beginning a migration pins the full source and target definitions in a migration record while the live definition keeps serving old clients. A breaking verdict from the compatibility checker, a target that renames the collection, or another active migration of the same collection refuses the migration before anything changes. Backfill computes extra attributes for existing records in batches, with a cursor and a version compare-and-set per record, retrying on a lost race, and is resumable and idempotent.
Validation checks every record, page by page, against the target shape and persists a clean result bound to a digest of the full target definition. Promotion makes the stored target live, and it is refused unless that digest matches, the backfill scan is complete and the live definition is still the source. Rollback is available from every phase and restores the source definition verbatim. Reads of migration records are fallible, so a fault is never reported as no migration in progress.
Where you reach it
- Library
kynetra_evolve: MigrationMachine, begin_online_migration, SchemaMigrationLedger (engine library, not wired to the server)
Limits
- Not reachable from the server or the command line. Replacing a collection definition does not rewrite stored records.
- Backfill functions are supplied by the embedding application as code.
Evidence
- TestsCovered in the engine repository by more than 60 tests for the state machine, the compatibility oracle, backfill, version matrix and forged ledger rows
Test coverage is listed as present in the engine repository at this edition. This page does not report test results.
KynetraDB is in private preview
This is not available in the preview. Request a preview to discuss the current scope.