You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by buddhasystem <po...@bnl.gov> on 2011/02/02 16:36:13 UTC

Commit log compaction

How often and by what criteria is the commit log compacted/truncated?

Thanks,

Maxim

-- 
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Commit-log-compaction-tp5985221p5985221.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.

Re: Commit log compaction

Posted by Jonathan Ellis <jb...@gmail.com>.
On Wed, Feb 2, 2011 at 12:29 PM, buddhasystem <po...@bnl.gov> wrote:
>
> Thank you. So what is exactly the condition that causes the older commit log
> files to actually be removed?

"Commit log segments (whose size are controllable via the
commitlog_rotation_threshold_in_mb option) are eligable for removal
when they do not contain any data that has yet to be flushed to
memtables."

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Re: Commit log compaction

Posted by buddhasystem <po...@bnl.gov>.
Thank you. So what is exactly the condition that causes the older commit log
files to actually be removed? I observe that indeed they are rotated out
when the threshold is reached, but then new ones a placed in the directory
and the older ones are still there.

Thanks,
Maxim

-- 
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Commit-log-compaction-tp5985221p5986399.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.

Re: Commit log compaction

Posted by Peter Schuller <pe...@infidyne.com>.
> How often and by what criteria is the commit log compacted/truncated?

Commit log segments (whose size are controllable via the
commitlog_rotation_threshold_in_mb option) are eligable for removal
when they do not contain any data that has yet to be flushed to
memtables. In practice, the memtable settings (flushing thresholds)
should be the primary driver of commit log retention. If you have
memtables which may go for an hour without being flushed, that puts a
lower bound on the amount of time the commitlog may need to be
retained.

-- 
/ Peter Schuller