liveBook · Manning

Repair

As explained in ScyllaDB in Action

Repair is a database maintenance process that synchronizes replicated data across nodes.

Repair is an anti-entropy operation that brings replicas toward agreement after a node misses writes. It is especially important for deletions: every replica must receive a tombstone before compaction can discard it, or an older deleted value can reappear. section 8.4.2 section 6.2.3

A node-level repair calculates checksums for rows, compares them with other replicas, and streams updated data to the node being repaired when values differ. Repairs can be limited to a keyspace, table, or token range. section 8.4.2

Keep repairs safe and practical:

  • Run repairs at least once within gc_grace_seconds so tombstones reach every node before becoming eligible for compaction. section 6.2.3 section 9.3.1
  • Run nodetool repair on every node; one invocation repairs only the node where it runs. section 9.3.1
  • Schedule recurring work with Scylla Manager rather than relying only on ad hoc commands. section 9.3.1
  • Increase --job-threads only with care: greater parallelism raises repair throughput and cluster load. section 9.3.1

Repair the reviews data

To repair a single node’s reviews keyspace, run nodetool repair reviews there. To make the cluster consistent, repeat the repair on every node. A full node repair proceeds through keyspaces one at a time. section 9.3.1

Figure 6.7 Repairing your data is important to ensure that tombstones are replicated to all nodes.
figure

The diagram highlights why repair must distribute tombstones to all nodes before deletion cleanup can safely remove them. section 6.2.3

How ScyllaDB in Action covers it

How deep it goes
Explains checksum-based row comparison, streaming, scopes, scheduling, and parallelism, without detailing repair internals beyond the node-level process.
Examples
Demonstrates shell access, nodetool repair output, and repairing the reviews keyspace or authors table.
What you can do after
Operate/configure it by scheduling repairs, choosing scopes, repairing every node, and balancing job threads against cluster load.
How it connects
Connects repair with tombstones, compaction, gc_grace_seconds, tunable consistency, nodetool, and Scylla Manager.

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.