Releasing schema changes across mixed versions
medium 6 minDuring a rolling deployment old and new binaries can read and write the same data.
Video lesson · Chapter 1 of 4
A new column meets an old reader
Theory
Read or listen first. About 1 min.
What it is
During a rolling deployment old and new binaries can read and write the same data. A schema migration is therefore a protocol change across versions. Expand the schema first, introduce compatible readers and writers, backfill in bounded batches, validate the result and remove the old representation only after every dependent path has moved.
Why it exists
A migration immediately requires a field that old workers omit. New requests pass smoke tests but in-flight jobs from the previous release start failing. Inventory readers, writers, rollback candidates and asynchronous consumers. Inspect lock acquisition as well as data compatibility because even a metadata change may wait behind a long transaction.
If mixed-version writes succeed but latency rises, inspect migration lock queues and backfill I/O before modifying format compatibility.
A new column meets an old reader
How it works
Step through the idea, or press Play.
Baseline. Both versions accept the old representation.
Understand it
Worked incident
A new column meets an old reader
| Observation | Incompatible writes per 1000 (writes) | Interpretation |
|---|---|---|
| Baseline | 0 | Both versions accept the old representation. |
| Incident | 65 | A new constraint rejects writes from still-running old workers. |
| After intervention | 0 | Restore a compatible transition and validate before enforcing the constraint. Exercise a mixed-version window. |
Choose the next investigation
Summary
The whole topic in one minute.
The rollout includes mixed generations. Compatibility must hold through deployment and the promised rollback window.
If mixed-version writes succeed but latency rises, inspect migration lock queues and backfill I/O before modifying format compatibility.