Reconciliation, rollback and modernization
Reconcile more than row counts
Two tables may have equal row counts and totals but different values for individual customers. Compare primary-key sets, row values, nulls, constraints and domain totals at a consistent source position. For large tables use partitioned checksums with canonical serialization, then investigate mismatched partitions and sample or compare rows; a checksum is evidence, not proof of application behavior. DMS validation can compare supported source and target rows; monitor pending and failed validation, and account for ongoing writes and supported table requirements. Validate permissions, application transactions and performance independently. In the local lab changing order-a by +100 and order-b by -100 preserves the total but must fail exact reconciliation.
Rollback depends on the write boundary
Before the destination accepts writes, an approved rollback may restore routing to the preserved source once source authority is safely re-established. After destination writes begin, switching DNS back alone can lose those writes. A rollback then requires a tested reverse replication or reconciliation path, conflict rules and approval; otherwise stop traffic and escalate to a recovery decision. Define who can abort, maximum tolerated downtime, triggers such as failed order creation, and verification after rollback. Never let both databases accept unrestricted writes just to reduce downtime. Track the authoritative writer and the last confirmed replication point.
Modernize after measuring and stabilize before retirement
A rehosted order service may still have manual patching and database operations. Compare moving the database to RDS, extracting asynchronous work into a queue or redesigning the service only against measured operational goals, latency, recovery needs, cost and team capacity. Use a staged rollout, contract tests and a rollback path; avoid combining unnecessary redesign with a hard migration deadline. After cutover, observe agreed service indicators and business totals through the stabilization period. Before retiring a source, obtain owner sign-off, dependency confirmation, retention/legal approval, tested restore capability and evidence of successful operation. Decommissioning is separate from traffic cutover; do not delete real resources in this exercise.
Practice migration decisions locally
Run python test_migration.py in lab-fixtures/migration-review. Inspect the inventory and baseline, replay synthetic changes in sequence, and compare rows against the expected final source. Test a gap, duplicate replay and equal-total mismatch. The teaching cutover gate requires frozen writes, complete replication, validation, smoke tests and approval. The rollback gate rejects a switch after target writes unless reverse reconciliation was verified. The retirement gate requires separate retention and dependency approvals. No actual MGN, DMS, DNS or cloud API is called; regional compatibility and real prices require independent verification.
{ "inventory": { "database": [], "identity": [], "orders": [ "database", "identity" ], "reporting": [ "orders" ] }, "baseline": [ [ "order-a", 1200 ], [ "order-b", 2300 ] ], "events": [ [ 1, "insert", "order-c", 700 ], [ 2, "update", "order-a", 1300 ] ], "expected": [ [ "order-a", 1300 ], [ "order-b", 2300 ], [ "order-c", 700 ] ]}Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Reconciliation, rollback and modernization — knowledge check
Reason about migration strategy, replication and acceptance gates.
Why is matching total value insufficient?
What makes rollback after target writes risky?
What should drive refactoring after migration?
When is source retirement appropriate?
What should the local cutover gate do when smoke tests fail?