On Tue, Apr 5, 2011 at 12:01 AM, Maki Watanabe <watanabe.m...@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