cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Ferland <>
Subject Re: Do I need to run repair and compaction every node?
Date Mon, 13 Apr 2015 22:33:09 GMT
Nodetool repair: The basic default sequential repair covers all nodes, computes merkle trees
in sequence one node at a time. Only need to run the command one node.
Nodetool repair -par: covers all nodes, computes merkle trees for each node at the same time.
Much higher IO load as every copy of a key range is scanned at once. Can be totally OK with
SSDs and throughput limits.  Only need to run the command one node.
Nodetool repair -pr: Only covers the ranges owned by the node's token(s). Must be run on each
node because each node owns a partial share of the ring.

Incremental repair: only consider range changes since the last repair. Probably can be combined
with whatever other flags.

> On Apr 13, 2015, at 2:37 PM, Benyi Wang <> wrote:
> What about "incremental repair" and "sequential repair"?
> I ran "nodetool repair -- keyspace table" on one node. I found the repair sessions running
on different nodes. Will this command repair the whole table?
> In this page:
> Using the nodetool repair -pr (–partitioner-range) option repairs only the first range
returned by the partitioner for a node. Other replicas for that range still have to perform
the Merkle tree calculation, causing a validation compaction.
> Does it sound like -pr runs on one node?
> I'm still don't understand "the first range returned by the partitioned for a node"?

> On Mon, Apr 13, 2015 at 1:40 PM, Robert Coli < <>>
> On Mon, Apr 13, 2015 at 1:36 PM, Benyi Wang < <>>
> I need to run compaction one each node, 
> In general, there is no requirement to manually run compaction. Minor compaction occurs
in the background, automatically. 
> To repair a table (column family), I only need to run repair on any of nodes.
> It depends on whether you are doing -pr or non -pr repair.
> If you are doing -pr repair, you run repair on all nodes. If you do non -pr repair, you
have to figure out what set of nodes to run it on. That's why -pr exists, to simplify this.

> =Rob

View raw message