The rollback that lost successful orders
Failure story 14, in migration, backfills and cutovers.
The challenge
Section titled “The challenge”The rollback took 40 seconds and worked exactly as rehearsed. Where are the 12 orders that customers were told had been placed?
The setup
Section titled “The setup”| Assumption | Value |
|---|---|
| Cutover | At 10:00, the router sends all order traffic to the new order system |
| Data | Before cutover, existing orders were copied to the new system. The old system receives nothing after 10:00 |
| Rollback plan | If a severe defect appears, switch the router back to the old system |
| Rehearsal | The rollback was rehearsed in staging, where nobody placed orders during the test |
What happened
Section titled “What happened”| Time | What happens |
|---|---|
| 10:00 | The router switches. The new system accepts orders. |
| 10:00–10:06 | 12 orders are accepted, paid for and confirmed by email. |
| 10:06 | Support reports that the new system is charging the wrong delivery fee. |
| 10:07 | The incident lead triggers the rollback. 40 seconds later, the old system is serving traffic again. |
| 10:30 | The old system’s fulfillment run starts. It has no record of the 12 orders. |
| Two days later | The first customer asks where their order is. |
Why it went wrong
Section titled “Why it went wrong”The rollback plan moved traffic and forgot data. Between cutover and rollback, the new system was the system of record; anything it accepted existed only there. Switching back made the old system the system of record again, without the facts that had been created in the meantime. The rehearsal couldn’t reveal this, because no one wrote anything during it.
Two designs
Section titled “Two designs”| Aspect | Design A: routing-only rollback | Design B: a cutover protocol that reconciles writes |
|---|---|---|
| After cutover | The old system receives nothing | Every write accepted by the new system is replicated back to the old one, until a declared point of no return |
| Rollback | Switch the router | Stop new writes for a moment, confirm the old system has every post-cutover write, then switch |
| Duplicate protection | Not needed, nothing is copied | Every order keeps the same ID in both systems, so a write applied twice is recognized |
| Rehearsal | Switch and switch back | Switch, place orders, switch back, and confirm they’re all there |
The point of no return is a decision, not an accident. Before it, reverse replication must be healthy and the old system must be able to hold everything the new one accepts. After it, rollback means fixing forward.
The check
Section titled “The check”Rehearse with writes, not without them.
- Cut over, place 12 orders through the new system, and roll back.
- Expected: every acknowledged order is retrievable from the old system: 12 of 12.
- Expected: each appears once: no order is duplicated by replication and a retry.
- Expected: every one of them is picked up by the old system’s fulfillment run.
Count acknowledged orders from the customer’s side (confirmation emails sent, payments captured), not from the new system’s database. The customer’s side is what you’ll be held to.
This check is in the checks catalog as test templates in Java and Python.
When the simpler design is enough
Section titled “When the simpler design is enough”- The new system is read-only until the point of no return, so there’s nothing to reconcile.
- The window between cutover and point of no return is closed for writes: a short maintenance period with the shop closed.
- Post-cutover writes are few, and a documented manual step re-enters them in the old system. Honest, but only if someone actually knows it’s their job at 10:07.
For educators
Section titled “For educators”Discussion question. When should the point of no return be declared, and who decides? What evidence would you want first?
Exercise. The new system added a feature: customers can choose a delivery slot. The old system has nowhere to store a slot. Under Design B, what happens to a post-cutover order with a slot when you roll back?
Worked answer
Reverse replication can’t carry the slot, so the order arrives in the old system without the customer’s chosen slot, and the business breaks a promise it made. Choices: don’t enable new-only features until after the point of no return, which is the usual answer; or store the extra data somewhere the old process can see, such as a note on the order, and flag those orders for manual handling during a rollback. The general rule: during the rollback window, the new system may only accept what the old system can represent. That’s a product constraint, so the product owner has to agree to it before cutover, not during the incident.
Related pages
Section titled “Related pages”Written and edited by Abhinav Taduka, enterprise software architect.
New pages are added regularly. Follow Abhinav on LinkedIn to see them first.