1
votes

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

1
Why do you say this doesn't repair all keyspaces? It should repair any keyspace within the local DC. Are you seeing otherwise? - Jim Wartnick
Yes. It only repaired two keyspaces. One keyspace remained unrepaired. I had to resort to nodetool repair --in-local-dc --full -j 4 keyspacename to get the last keyspace repaired. Just thought this was odd. - pmla

1 Answers

0
votes

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.