Dual-read validation checks a data migration through the application itself: each request is read from the primary source database and the secondary destination database, then the results are compared. section 12.2.5
A practical validation flow is:
- Send the normal request to the primary source and also issue it against the destination. section 12.2.5
- Compare the returned values and treat equivalent results as a successful check. section 12.2.5
- If values differ, read again because an actively updated row may have changed between the two reads. section 12.2.5
- Log queries whose results do not converge, then investigate whether the difference is harmless or meaningful. section 12.2.5
Interpreting a mismatch
A mismatch may be functionally equivalent, such as timestamps represented in milliseconds and microseconds, or meaningfully different, such as missing fields or an entire row. User-visible behavior should remain unchanged during the migration. section 12.2.5
Figure 12.8 By dual-reading your application’s request, you can check for mismatches and verify the correctness of your migration.
The figure traces an application request sent to both databases and shows comparison as the validation step. section 12.2.5
