Sam
Sam

Reputation: 446

Nodetool repair -pr -full vs Nodetool repair -pr

I am running a cluster with 1 datacenter (6 nodes) and Cassandra 3.11.0 installed on each node with replication factor 2. I know nodetool repair -pr will carry out a repair of the primary ranges on that node. My question, is how nodetool repair -pr -full is different from nodetool repair -pr?

Which repair option should I use on a heavy load production system?

Upvotes: 3

Views: 3299

Answers (3)

Divyanshu Sharma
Divyanshu Sharma

Reputation: 1

Its recommended that do not execute incremental repair with -PR option. it will skip non-primary replicas unrepaired and is not a good practice in long run !!

Upvotes: 0

Aaron
Aaron

Reputation: 57808

my question is how nodetool repair -pr -full is different from nodetool repair -pr?

So a "full" repair means that all data between the source and target nodes will be verified and repaired. Essentially, it's the opposite of an "incremental" repair, where only a subset of data is repaired. These two options control how much data is repaired.

Once that is decided (incremental vs. full), -pr will run on that subset, and only then repairs the primary replicas.

Additionally, -full is the default for Cassandra 3; which would make -pr and -pr -full essentially the same.

Which repair option should I use on a heavy load production system?

I'll second what Alex said, and also recommend Cassandra Reaper for this. It has the ability to schedule repairs for slower times, as well as allowing you to pause repairs which don't complete in time.

Upvotes: 2

Alex Ott
Alex Ott

Reputation: 87319

For production systems, as part of it's better to use token range repair (using -st/-et options) to limit the load onto the nodes. Doing it manually could be tedious, but it could be automated with tools like Reaper, that track what token ranges are already repaired, and what not.

Upvotes: 2

Related Questions