pmla
pmla

Reputation: 15

How to repair cassandra nodes

I have a cassandra cluster with two datacenters. In datacenter 2 I have a keyspace with replication factor 3. I want to repair all keyspaces in datacenter 2. I have tried to run:

nodetool repair --in-local-dc --full -j 4

But this command does not repair all keyspaces. Does anybody know if this is intended behaviour ? Cassandra logs does not indicate any problems

Upvotes: 1

Views: 982

Answers (1)

Aaron
Aaron

Reputation: 57798

So I have also had issues with multi-DC repairs when designating a source DC. I don't know if those DC-specific repair flags are buggy, but I have found that pretty much the best way to ensure that only specific nodes are involved in a repair is to specify each one.

nodetool repair keyspace_name  -hosts 10.6.8.2 -hosts 10.6.8.3 -hosts 10.6.8.1
    -hosts 10.6.8.5 -hosts 10.6.8.4 -hosts 10.1.3.1 -full

Note that my goal was to run this repair on 10.1.3.1 while SSH'd into it. The node you are running the repair on must also be specified with a -hosts flag. Also make sure that each node in the source DC is listed, otherwise you'll get errors about missing source token ranges.

Try that and see if that helps.

Upvotes: 0

Related Questions