S. Najim
S. Najim

Reputation: 303

Do we need to run the nodetool repair on every node in the cluster ?

is nodetool repair command need to be run on the all cluster nodes ?

i understand that this command repair the replica on a node with the other replicas and we need to run it on all node to get high consistency.

Upvotes: 1

Views: 2307

Answers (1)

dilsingi
dilsingi

Reputation: 2958

The "nodetool repair" on single node only triggers a repair on its range of tokens with other nodes in cluster. You need it run in every node sequentially, for the complete data in cluster to be repaired.

Also a good alternative/recommendation is to use "nodetool repair -pr". The "-pr" option indicates that only a primary-range of tokens in a given node is repaired. But again this needs to be run on every node in every DC of the cluster.

The repair command only repairs token ranges on the node being repaired, it doesn't repair the whole cluster.By default, repair will operate on all token ranges replicated by the node you’re running repair on, which will cause duplicate work if you run it on every node. The -pr flag will only repair the “primary” ranges on a node, so you can repair your entire cluster by running nodetool repair -pr on each node in a single datacenter. Reference

Upvotes: 2

Related Questions