You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Anty <an...@gmail.com> on 2010/07/07 12:21:50 UTC

Why so many commitlogs ?

Hi:all
In my little cluter ,after i insert many many records into cassandra, there
are hundreds of commit log files in commitlog log directory.
is it normal ?
I read the source code of commitlog , there shouldn't be so many commitlog
log files .
any clue will be appreciate.

-- 
Best Regards
Anty Rao

Re: Why so many commitlogs ?

Posted by Anty <an...@gmail.com>.
Hi:Jonathan
I have found out what's going wrong.
I change the configuration
<MemtableFlushAfterMinutes>1440</MemtableFlushAfterMinutes>
which prevent memtables of LocaitonInfo and HintsColumnFamily to flush if
there are a few hint records writen to many commitlog segment.
On Thu, Jul 8, 2010 at 9:43 AM, Anty <an...@gmail.com> wrote:

>
>
> On Thu, Jul 8, 2010 at 9:21 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>
>> you're not out of disk space, are you?
>>
>> No.
>
>> if not you could try restarting, that should clear them out if nothing
>> else does
>>
> Yes. I restarted the node, then the commitlogs were removed.
> But recover so many commitlog take so much time.
>
>>
>> On Wed, Jul 7, 2010 at 8:07 PM, Anty <an...@gmail.com> wrote:
>> > Thx Jonathan.
>> >
>> >
>> > On Wed, Jul 7, 2010 at 11:58 PM, Jonathan Ellis <jb...@gmail.com>
>> wrote:
>> >>
>> >> number of memtables waiting to flush has a pretty low bound (# of data
>> >> file directories in 0.6.3)
>> >>
>> > O ,I seen
>> >>
>> >> did you check your log for exceptions?
>> >
>> > Yes ,but no exceptions.
>> >
>> >
>> >
>> >>
>> >> On Wed, Jul 7, 2010 at 10:35 AM, Anty <an...@gmail.com> wrote:
>> >> > yes, i know. I only insert records into one CF.
>> >> >
>> >> > when a memtable flush complete, commitlog  will check if there are
>> some
>> >> > obsolete commitlog segments.
>> >> > I don't known why there are so many commitlog file out there.
>> >> > is there a possibility that too many memtables is waiting for
>> flushing,
>> >> > which prevent many commitlog files from  being removed.
>> >> >
>> >> > On Wed, Jul 7, 2010 at 10:13 PM, Jonathan Ellis <jb...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> commitlogs can be removed after _all_ the CFs they have data for
>> have
>> >> >> been flushed.
>> >> >>
>> >> >> On Wed, Jul 7, 2010 at 5:21 AM, Anty <an...@gmail.com> wrote:
>> >> >> > Hi:all
>> >> >> > In my little cluter ,after i insert many many records into
>> cassandra,
>> >> >> > there
>> >> >> > are hundreds of commit log files in commitlog log directory.
>> >> >> > is it normal ?
>> >> >> > I read the source code of commitlog , there shouldn't be so many
>> >> >> > commitlog
>> >> >> > log files .
>> >> >> > any clue will be appreciate.
>> >> >> >
>> >> >> > --
>> >> >> > Best Regards
>> >> >> > Anty Rao
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Jonathan Ellis
>> >> >> Project Chair, Apache Cassandra
>> >> >> co-founder of Riptano, the source for professional Cassandra support
>> >> >> http://riptano.com
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Best Regards
>> >> > Anty Rao
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Jonathan Ellis
>> >> Project Chair, Apache Cassandra
>> >> co-founder of Riptano, the source for professional Cassandra support
>> >> http://riptano.com
>> >
>> >
>> >
>> > --
>> > Best Regards
>> > Anty Rao
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of Riptano, the source for professional Cassandra support
>> http://riptano.com
>>
>
>
>
> --
> Best Regards
> Anty Rao
>



-- 
Best Regards
Anty Rao

Re: Why so many commitlogs ?

Posted by Anty <an...@gmail.com>.
On Thu, Jul 8, 2010 at 9:21 AM, Jonathan Ellis <jb...@gmail.com> wrote:

> you're not out of disk space, are you?
>
> No.

> if not you could try restarting, that should clear them out if nothing else
> does
>
Yes. I restarted the node, then the commitlogs were removed.
But recover so many commitlog take so much time.

>
> On Wed, Jul 7, 2010 at 8:07 PM, Anty <an...@gmail.com> wrote:
> > Thx Jonathan.
> >
> >
> > On Wed, Jul 7, 2010 at 11:58 PM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> >>
> >> number of memtables waiting to flush has a pretty low bound (# of data
> >> file directories in 0.6.3)
> >>
> > O ,I seen
> >>
> >> did you check your log for exceptions?
> >
> > Yes ,but no exceptions.
> >
> >
> >
> >>
> >> On Wed, Jul 7, 2010 at 10:35 AM, Anty <an...@gmail.com> wrote:
> >> > yes, i know. I only insert records into one CF.
> >> >
> >> > when a memtable flush complete, commitlog  will check if there are
> some
> >> > obsolete commitlog segments.
> >> > I don't known why there are so many commitlog file out there.
> >> > is there a possibility that too many memtables is waiting for
> flushing,
> >> > which prevent many commitlog files from  being removed.
> >> >
> >> > On Wed, Jul 7, 2010 at 10:13 PM, Jonathan Ellis <jb...@gmail.com>
> >> > wrote:
> >> >>
> >> >> commitlogs can be removed after _all_ the CFs they have data for have
> >> >> been flushed.
> >> >>
> >> >> On Wed, Jul 7, 2010 at 5:21 AM, Anty <an...@gmail.com> wrote:
> >> >> > Hi:all
> >> >> > In my little cluter ,after i insert many many records into
> cassandra,
> >> >> > there
> >> >> > are hundreds of commit log files in commitlog log directory.
> >> >> > is it normal ?
> >> >> > I read the source code of commitlog , there shouldn't be so many
> >> >> > commitlog
> >> >> > log files .
> >> >> > any clue will be appreciate.
> >> >> >
> >> >> > --
> >> >> > Best Regards
> >> >> > Anty Rao
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Jonathan Ellis
> >> >> Project Chair, Apache Cassandra
> >> >> co-founder of Riptano, the source for professional Cassandra support
> >> >> http://riptano.com
> >> >
> >> >
> >> >
> >> > --
> >> > Best Regards
> >> > Anty Rao
> >> >
> >>
> >>
> >>
> >> --
> >> Jonathan Ellis
> >> Project Chair, Apache Cassandra
> >> co-founder of Riptano, the source for professional Cassandra support
> >> http://riptano.com
> >
> >
> >
> > --
> > Best Regards
> > Anty Rao
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>



-- 
Best Regards
Anty Rao

Re: Why so many commitlogs ?

Posted by Jonathan Ellis <jb...@gmail.com>.
you're not out of disk space, are you?

if not you could try restarting, that should clear them out if nothing else does

On Wed, Jul 7, 2010 at 8:07 PM, Anty <an...@gmail.com> wrote:
> Thx Jonathan.
>
>
> On Wed, Jul 7, 2010 at 11:58 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>>
>> number of memtables waiting to flush has a pretty low bound (# of data
>> file directories in 0.6.3)
>>
> O ,I seen
>>
>> did you check your log for exceptions?
>
> Yes ,but no exceptions.
>
>
>
>>
>> On Wed, Jul 7, 2010 at 10:35 AM, Anty <an...@gmail.com> wrote:
>> > yes, i know. I only insert records into one CF.
>> >
>> > when a memtable flush complete, commitlog  will check if there are some
>> > obsolete commitlog segments.
>> > I don't known why there are so many commitlog file out there.
>> > is there a possibility that too many memtables is waiting for flushing,
>> > which prevent many commitlog files from  being removed.
>> >
>> > On Wed, Jul 7, 2010 at 10:13 PM, Jonathan Ellis <jb...@gmail.com>
>> > wrote:
>> >>
>> >> commitlogs can be removed after _all_ the CFs they have data for have
>> >> been flushed.
>> >>
>> >> On Wed, Jul 7, 2010 at 5:21 AM, Anty <an...@gmail.com> wrote:
>> >> > Hi:all
>> >> > In my little cluter ,after i insert many many records into cassandra,
>> >> > there
>> >> > are hundreds of commit log files in commitlog log directory.
>> >> > is it normal ?
>> >> > I read the source code of commitlog , there shouldn't be so many
>> >> > commitlog
>> >> > log files .
>> >> > any clue will be appreciate.
>> >> >
>> >> > --
>> >> > Best Regards
>> >> > Anty Rao
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Jonathan Ellis
>> >> Project Chair, Apache Cassandra
>> >> co-founder of Riptano, the source for professional Cassandra support
>> >> http://riptano.com
>> >
>> >
>> >
>> > --
>> > Best Regards
>> > Anty Rao
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of Riptano, the source for professional Cassandra support
>> http://riptano.com
>
>
>
> --
> Best Regards
> Anty Rao
>



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

Re: Why so many commitlogs ?

Posted by Anty <an...@gmail.com>.
Thx Jonathan.


On Wed, Jul 7, 2010 at 11:58 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> number of memtables waiting to flush has a pretty low bound (# of data
> file directories in 0.6.3)
>
> O ,I seen

> did you check your log for exceptions?
>
Yes ,but no exceptions.




> On Wed, Jul 7, 2010 at 10:35 AM, Anty <an...@gmail.com> wrote:
> > yes, i know. I only insert records into one CF.
> >
> > when a memtable flush complete, commitlog  will check if there are some
> > obsolete commitlog segments.
> > I don't known why there are so many commitlog file out there.
> > is there a possibility that too many memtables is waiting for flushing,
> > which prevent many commitlog files from  being removed.
> >
> > On Wed, Jul 7, 2010 at 10:13 PM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> >>
> >> commitlogs can be removed after _all_ the CFs they have data for have
> >> been flushed.
> >>
> >> On Wed, Jul 7, 2010 at 5:21 AM, Anty <an...@gmail.com> wrote:
> >> > Hi:all
> >> > In my little cluter ,after i insert many many records into cassandra,
> >> > there
> >> > are hundreds of commit log files in commitlog log directory.
> >> > is it normal ?
> >> > I read the source code of commitlog , there shouldn't be so many
> >> > commitlog
> >> > log files .
> >> > any clue will be appreciate.
> >> >
> >> > --
> >> > Best Regards
> >> > Anty Rao
> >> >
> >>
> >>
> >>
> >> --
> >> Jonathan Ellis
> >> Project Chair, Apache Cassandra
> >> co-founder of Riptano, the source for professional Cassandra support
> >> http://riptano.com
> >
> >
> >
> > --
> > Best Regards
> > Anty Rao
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>



-- 
Best Regards
Anty Rao

Re: Why so many commitlogs ?

Posted by Jonathan Ellis <jb...@gmail.com>.
number of memtables waiting to flush has a pretty low bound (# of data
file directories in 0.6.3)

did you check your log for exceptions?

On Wed, Jul 7, 2010 at 10:35 AM, Anty <an...@gmail.com> wrote:
> yes, i know. I only insert records into one CF.
>
> when a memtable flush complete, commitlog  will check if there are some
> obsolete commitlog segments.
> I don't known why there are so many commitlog file out there.
> is there a possibility that too many memtables is waiting for flushing,
> which prevent many commitlog files from  being removed.
>
> On Wed, Jul 7, 2010 at 10:13 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>>
>> commitlogs can be removed after _all_ the CFs they have data for have
>> been flushed.
>>
>> On Wed, Jul 7, 2010 at 5:21 AM, Anty <an...@gmail.com> wrote:
>> > Hi:all
>> > In my little cluter ,after i insert many many records into cassandra,
>> > there
>> > are hundreds of commit log files in commitlog log directory.
>> > is it normal ?
>> > I read the source code of commitlog , there shouldn't be so many
>> > commitlog
>> > log files .
>> > any clue will be appreciate.
>> >
>> > --
>> > Best Regards
>> > Anty Rao
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of Riptano, the source for professional Cassandra support
>> http://riptano.com
>
>
>
> --
> Best Regards
> Anty Rao
>



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

Re: Why so many commitlogs ?

Posted by Anty <an...@gmail.com>.
yes, i know. I only insert records into one CF.

when a memtable flush complete, commitlog  will check if there are some
obsolete commitlog segments.
I don't known why there are so many commitlog file out there.
is there a possibility that too many memtables is waiting for flushing,
which prevent many commitlog files from  being removed.

On Wed, Jul 7, 2010 at 10:13 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> commitlogs can be removed after _all_ the CFs they have data for have
> been flushed.
>
> On Wed, Jul 7, 2010 at 5:21 AM, Anty <an...@gmail.com> wrote:
> > Hi:all
> > In my little cluter ,after i insert many many records into cassandra,
> there
> > are hundreds of commit log files in commitlog log directory.
> > is it normal ?
> > I read the source code of commitlog , there shouldn't be so many
> commitlog
> > log files .
> > any clue will be appreciate.
> >
> > --
> > Best Regards
> > Anty Rao
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>



-- 
Best Regards
Anty Rao

Re: Why so many commitlogs ?

Posted by Anty <an...@gmail.com>.
yes, i know. I only insert records into one CF.

when a memtable flush complete, commitlog  will check if there are some
obsolete commitlog segments.
I don't known why there are so many commitlog file out there.
is there a possibility that too many memtables is waiting for flushing,
which prevent many commitlog files from  being removed.

On Wed, Jul 7, 2010 at 10:13 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> commitlogs can be removed after _all_ the CFs they have data for have
> been flushed.
>
> On Wed, Jul 7, 2010 at 5:21 AM, Anty <an...@gmail.com> wrote:
> > Hi:all
> > In my little cluter ,after i insert many many records into cassandra,
> there
> > are hundreds of commit log files in commitlog log directory.
> > is it normal ?
> > I read the source code of commitlog , there shouldn't be so many
> commitlog
> > log files .
> > any clue will be appreciate.
> >
> > --
> > Best Regards
> > Anty Rao
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>



-- 
Best Regards
Anty Rao

Re: Why so many commitlogs ?

Posted by Jonathan Ellis <jb...@gmail.com>.
commitlogs can be removed after _all_ the CFs they have data for have
been flushed.

On Wed, Jul 7, 2010 at 5:21 AM, Anty <an...@gmail.com> wrote:
> Hi:all
> In my little cluter ,after i insert many many records into cassandra, there
> are hundreds of commit log files in commitlog log directory.
> is it normal ?
> I read the source code of commitlog , there shouldn't be so many commitlog
> log files .
> any clue will be appreciate.
>
> --
> Best Regards
> Anty Rao
>



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

Re: Why so many commitlogs ?

Posted by Jonathan Ellis <jb...@gmail.com>.
commitlogs can be removed after _all_ the CFs they have data for have
been flushed.

On Wed, Jul 7, 2010 at 5:21 AM, Anty <an...@gmail.com> wrote:
> Hi:all
> In my little cluter ,after i insert many many records into cassandra, there
> are hundreds of commit log files in commitlog log directory.
> is it normal ?
> I read the source code of commitlog , there shouldn't be so many commitlog
> log files .
> any clue will be appreciate.
>
> --
> Best Regards
> Anty Rao
>



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