The migration script reports success. Row counts match on both sides. The application boots, the home page renders, a test order completes. A week later, the finance team flags that the destination is missing three days of order line items from the cutover window — and the source has already been decommissioned. The dump completed; the parity check never ran.
What’s happening
Row counts are a weak parity signal. They confirm cardinality but say nothing about content, ordering, or rows mutated mid-dump. Logical dumps that run for hours on a write-heavy source produce a snapshot that drifts: rows inserted after the table’s dump position are captured, rows updated after their dump position are not, and the destination ends up with a consistent-looking but logically incoherent state. Add a parallel-stack window where writes continue on the source after the initial sync, and “parity” becomes a moving target unless something explicitly closes the gap.
How to verify
For each high-value table, run checksum-style comparisons that survive minor ordering differences:
SELECT COUNT(*), MIN(id), MAX(id),
SUM(CRC32(CONCAT_WS('|', col_a, col_b, updated_at))) AS hash
FROM critical_table;
Run the same query on source and destination at the same logical point in time. Differences in the hash with matching counts mean content drift. For very large tables, partition the check by primary-key range and compare chunk hashes. Use pt-table-checksum for replicating MySQL where applicable. For object storage and uploaded files:
find /var/www/uploads -type f -printf "%P %s\n" | sort | sha256sum
Run on both sides. Differences point to missed files or in-flight uploads that landed on only one stack.
The fix
Treat parity as a release gate, not a sanity check. Before opening user traffic on the destination: snapshot the source at a known point, replay the changelog onto the destination, run chunked checksums on the top 20 tables by mutation rate, and reconcile any difference before flipping the writer. During the parallel-stack window, run an incremental change-data-capture stream from source to destination — binlog tailing for MySQL, logical replication slots for PostgreSQL — so the gap stays small enough to close in a measurable cutover step.
The reconciliation pass is mandatory, not optional. We bake it into every cutover plan as part of our migration solutions.