cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maki Watanabe <watanabe.m...@gmail.com>
Subject Re: nodetool repair & compact
Date Wed, 06 Apr 2011 02:03:22 GMT
Thanks Sylvain, it's very clear.
But should I still need to force major compaction regularly to clear tombstones?
I know that minor compaction clear the tombstones after 0.7, but
maximumCompactionThreshold limits the maximum number of sstable which
will be merged at once, so to GC all tombstones in all sstable in
gc_grace_period, it is safe to run "nodetool compact" at least once in
gc_grace_period, isn't it?

maki

2011/4/6 Sylvain Lebresne <sylvain@datastax.com>:
> On Tue, Apr 5, 2011 at 12:01 AM, Maki Watanabe <watanabe.maki@gmail.com> wrote:
>> Hello,
>> On reading O'Reilly's Cassandra book and wiki, I'm a bit confusing on
>> nodetool repair and compact.
>> I believe we need to run nodetool repair regularly, and it synchronize
>> all replica nodes at the end.
>> According to the documents the "repair" invokes major compaction also
>> (as side effect?).
>
> Those documents are wrong then. A repair does not trigger a major
> compaction. The only thing that makes it similar to a major compaction is
> that it will iterate over all the sstables. But for instance, you won't end
> up with one big sstable at the end of repair as you would with a major
> compaction.
>
>> Will this "major compaction" apply on replica nodes too?
>>
>> If I have 3 node ring and CF of RF=3, what should I do periodically on
>> this system is:
>> - nodetool repair on one of the nodes
>> or
>> - nodetool repair on one of the nodes, and nodetool compact on 2 of the nodes
>> ?
>
> So as said, repair and compact are independent. You should
> periodically run nodetool
> repair (on one of your nodes in your case as you said). However, it is
> not advised anymore
> to run nodetool compact regularly unless you have a good reason to.
>
> --
> Sylvain
>

Mime
View raw message