Repair

As Apache Cassandra is an eventually consistent database, it knowingly sacrifices consistency. Sometimes, network conditions, hardware/instance failures, or periods of extremely high load can cause issues with data replication. To remedy these possible scenarios, you should run weekly repairs on your cluster.

Simply running this statement without any parameters will invoke a full repair on all keyspaces and tables in the cluster:

nodetool repair -full

As the system keyspaces shouldn't need to be repaired regularly, this command can be focused on repairing all tables in a particular keyspace:

nodetool repair -full packt_chapter3

Likewise, you can also specify a particular table to be repaired as follows:

nodetool repair -full packt_chapter3 ...

Get Mastering Apache Cassandra 3.x - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.