Safe Consistency Migration Workflow¶
Migration workflow — instantiates Shared-State Consistency Contract Design
Changes a live system's consistency semantics in reversible, observable stages — dual paths, shadow comparison, staged cutover — instead of flipping the guarantee as a silent config change.
Safe Consistency Migration Workflow is the procedure for changing what a running system promises about shared state — eventual to causal, last-write-wins to a merge type, single-region to multi-region — without breaking clients who depend on the old promise. Its defining stance is that a semantics change is a migration, not a toggle: it must be staged, reversible at each step, observed while both behaviors run in parallel, and recorded so that "what did a successful operation mean on this date" is always answerable. This directly counters the archetype's named failure — deploying a semantic change as an ordinary configuration flip, where clients silently start relying on a guarantee that quietly changed underneath them.
Example¶
A store keeps shopping carts in a last-write-wins register, which silently drops an item when a customer adds from two devices at once. The team wants to move to an add-wins CRDT set that keeps both. Rather than flip the storage type, they run the migration in stages: (1) dual-write — every cart mutation writes both the old register and the new CRDT; (2) shadow-read and compare — reads still serve the old value, but an oracle compares what the CRDT would have returned and logs divergences; (3) staged cutover — reads move to the CRDT one customer cohort at a time behind a flag, each cohort independently rollback-able; (4) backfill historical carts; (5) retire the old path. The audit trail records the exact moment each cohort's semantics changed, so a later dispute ("the cart lost an item on the 3rd") can be answered against the semantics actually in force then. When a cohort's divergence spikes, the flag rolls back with no customer impact.
How it works¶
The distinguishing structure is expand/contract applied to semantics: add the new behavior alongside the old, migrate consumers gradually, then remove the old — so no single step is a breaking flip.[1] A comparison oracle runs during the shadow stage to catch client-visible behavior changes before any cutover, and every stage transition is reversible and recorded. The workflow does not decide which new guarantee to adopt (that is a design decision made elsewhere); it is the machinery for getting there safely on live state.
Tuning parameters¶
- Stage granularity / cohort size — small cohorts shrink blast radius but lengthen the migration.
- Shadow duration & compare threshold — longer shadowing and tighter thresholds raise confidence at the cost of time.
- Rollback trigger — how aggressively a divergence or SLO breach auto-reverts a cohort: safety vs. churn.
- Path strategy — dual-write, dual-read, or both, chosen to match the kind of change (write-semantics vs. read-semantics).
- Backfill strategy — whether and how historical data is converted, trading completeness against load.
When it helps, and when it misleads¶
Its strength is turning a scary, seemingly-irreversible semantics flip into an evidence-gated, reversible rollout that is auditable after the fact and catches surprises in shadow before customers feel them.
It misleads when the dual-run stages are themselves mishandled. Dual-writes that are not idempotent or correctly ordered can introduce the very inconsistency the migration is meant to fix; long parallel-run windows are costly and tempt teams to skip the comparison. The backwards version is flipping the flag first and writing the migration story afterward — precisely the silent-config-change anti-pattern in disguise. The discipline is to never change semantics as a bare config value: keep the old path live until the shadow comparison is clean, and record every cutover.
How it implements the components¶
consistency_migration_plan— the staged, reversible plan (dual-path, shadow, cohorted cutover, backfill, retire) that carries a live system from one guarantee to another.audit_trail— the durable record of which semantics was in effect for whom and when, so a change is never silent and past behavior stays explainable.
It does not choose the target guarantee (consistency_guarantee_profile, client_facing_semantics_contract) — that is Consistency Contract Decision Record — nor supply the shadow-stage comparison oracle (Sequential-Consistency Trace Protocol / Consistency History Checker) or the rollout dashboards (Replica-Lag and Freshness Dashboard).
Related¶
- Instantiates: Shared-State Consistency Contract Design — governs how the contract itself is allowed to change over time.
- Consumes: a comparison oracle for the shadow stage and Replica-Lag and Freshness Dashboard to watch each cohort.
- Sibling mechanisms: Consistency Contract Decision Record · Sequential-Consistency Trace Protocol · Replica-Lag and Freshness Dashboard · Consistency History Checker
Editorial Notes¶
Form Classification¶
Form family: Protocol, Workflow & Routine
Rationale: Safe Consistency Migration Workflow operates as a repeatable ordered procedure or handoff sequence that coordinates action because it changes a live system's consistency semantics in reversible, observable stages — dual paths, shadow comparison, staged cutover — instead of flipping the guarantee as a silent config change.
Independent corroboration: The frozen evidence defines Safe Consistency Migration Workflow as 'Changes a live system's consistency semantics in reversible, observable stages — dual paths, shadow comparison, staged cutover — instead of flipping the guarantee as a silent config change', so its operative form is Protocol, Workflow & Routine.
Nearest alternative: Control, Automation & Runtime — Safe Consistency Migration Workflow includes features of a live operational control that automatically routes, enforces, adapts, or responds during execution, but its defining operation is a repeatable ordered procedure or handoff sequence that coordinates action.
Review outcome: Independent reviewer agreement; medium confidence.
Origin Attribution¶
Primary origin: Computer Science & Software Engineering
Origin pattern: Single lineage
Present-day reach: Specialized
Rationale: Dual paths, shadow comparison, staged cutover, and rollback for changing consistency semantics are distributed-systems practices.
Related originating lineages:
- Engineering & Design (beyond software) — Engineering design, reliability, and systems-safety practice supplies a parallel or contributing lineage for the mechanism's defining operation: changes a live system's consistency semantics in reversible, observable stages — dual paths, shadow comparison, staged cutover — instead of flipping the guarantee as a silent config….
Review resolution: Both blind reviewers agree that computer_science is the primary historical origin. Explicit reconciliation of alternate_origin_disagreement, encyclopedia_synthesis_disagreement starts from reviewer_a's mechanism-specific evidence: Dual paths, shadow comparison, staged cutover, and rollback for changing consistency semantics are distributed-systems practices. Reviewer A proposed alternates=none, origin_mode=single_lineage, domain_reach=specialized, and encyclopedia_synthesis=false; reviewer B proposed alternates=engineering_design, origin_mode=single_lineage, domain_reach=specialized, and encyclopedia_synthesis=true. The final record retains every independently supported alternate from either review (engineering_design) without an arbitrary cap, selects origin_mode=single_lineage to represent the combined lineage evidence, and records domain_reach=specialized and encyclopedia_synthesis=true. Present-day transfer is recorded as reach and is not treated as proof of historical origin.
Encyclopedia synthesis: The exact catalogued form synthesizes established practice rather than reproducing a single standard historical label.
Review outcome: Reconciled after independent review; high confidence.
Notes¶
The migration's own machinery can be a source of inconsistency: a dual-write is a two-target write, so unless each side is idempotent and ordered, a partial failure leaves the two representations disagreeing. Treat the dual-write path as its own small consistency problem — reconcilable on retry — rather than assuming it is safe because it is temporary.
References¶
[1] Sato, D. “Parallel Change.” MartinFowler.com (2014). Defines parallel change as an expand-migrate-contract sequence that keeps old and new interfaces available during a gradual migration. registry ↩ Show verification details
SupportedVerified against the work's full text
Sato's Parallel Change defines expand, migrate, contract: support old and new side by side, move clients over incrementally, then remove the old version.
“In the expand phase you augment the interface to support both the old and the new versions.”