Read Repair: repair during read path

Describes read repair, repair during read path.

Read repair improves consistency in a DataStax Enterprise (DSE) cluster with every read request.

In a read, the coordinator node sends a data request to one replica node and digest requests to others for consistency level (CL) greater than ONE. If all nodes return consistent data, the coordinator returns it to the client. For a description of how the database handles inconsistency among replicas, see How are read requests accomplished?.

In read repair, the database sends a digest request to each replica not directly involved in the read. The database compares all replicas and writes the most recent version to any replica node that does not have it. If the query's consistency level is greater than ONE, the database performs this process on all replica nodes in the foreground before the data is returned to the client. Read repair applies repairs to any node queried by the read. This means that for a consistency level of ONE or ANY, no data is repaired because no comparison takes place. For QUORUM, only the nodes that the query touches are repaired, not all nodes.

Read repair cannot be performed on tables that use DateTieredCompactionStrategy (DTCS) - Deprecated, due to the method of checking timestamps used in DTCS compaction. If your table uses DateTieredCompactionStrategy, set read_repair_chance to zero. For other compaction strategies, read_repair_chance is typically set to a value of 0.2.