liveBook · Manning

Validation

As explained in ScyllaDB in Action

Data validation is the process of checking that migrated data is complete and accurate relative to its source.

Data validation checks whether a migration is both comprehensive and correct: every source record reaches the destination, and its meaning remains intact. Copying rows alone is not proof of success; missing data or subtle differences such as timestamp precision can affect application behavior. section 12.2 section 12.2.5

Treat validation as part of an online migration, especially when the source continues receiving writes. New updates must reach both databases, and validation should test what the application actually observes rather than assuming matching storage formats imply matching results. section 12.2 section 12.2.5

Validate a migration with two complementary checks:

  • Check comprehensiveness by comparing source and destination data, using migrator support such as Spark Migrator where available, to find source data absent from ScyllaDB. section 12.2.5
  • Check correctness through dual-reading: send an application request to the primary source and secondary destination, then compare the results. section 12.2.5
  • Retry a mismatch once when rows may be changing rapidly; updates between reads can create temporary differences. section 12.2.5
  • Log mismatches that do not converge, then investigate whether values are functionally equivalent or meaningfully different, such as a missing field or row. section 12.2.5

Dual-read comparison

A request first reads the source database and also reads ScyllaDB. Equal results support correctness. A timestamp represented in milliseconds on one side and microseconds on the other may differ in representation while remaining functionally equivalent. Missing fields or an absent row require investigation and potentially a fix before users rely on the destination. 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.
figure

Trace the dual-read path to see where comparison and mismatch detection fit into an application request. section 12.2.5

Validation protects users from visible migration failures. Do not immediately switch all traffic to the destination; compare live reads probabilistically, investigate discrepancies, and use the results to decide whether the destination behaves equivalently for upstream applications. section 12.2.5

How ScyllaDB in Action covers it

How deep it goes
Defines completeness and correctness, then details comparisons, retries, logging, and mismatch classification.
Examples
Uses source-versus-destination reads and millisecond-versus-microsecond timestamps to classify mismatches.
What you can do after
Diagnose migration mismatches by comparing dual-reads, retrying transient differences, and investigating persistent ones.
How it connects
Links data migration with dual-write, dual-read, Spark Migrator, and application behavior.

Also explained in

Compare how 30 books explain validation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.