You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Liam Stewart <li...@gmail.com> on 2012/10/08 19:23:31 UTC

log retention and a single log file

What will Kafka do if a topic has a single log segment smaller than the
retention size but is eligible for deletion based on retention time? I
think that it will be kept because without it the remaining (zero) segments
will be below the log retention size - is that correct?

liam

-- 
Liam Stewart :: liam.stewart@gmail.com

Re: log retention and a single log file

Posted by Jun Rao <ju...@gmail.com>.
The log garbage collection will be triggered by either the size or the time
based retention policy, which ever comes first. So, assuming the last
segment hasn't been updated in retention time, it will be deleted and an
empty segment will be rolled.

Thanks,

Jun

On Mon, Oct 8, 2012 at 11:05 AM, Liam Stewart <li...@gmail.com>wrote:

> And the next question is, what happens when only the time based policy is
> enabled?
>
> On Mon, Oct 8, 2012 at 10:23 AM, Liam Stewart <liam.stewart@gmail.com
> >wrote:
>
> > What will Kafka do if a topic has a single log segment smaller than the
> > retention size but is eligible for deletion based on retention time? I
> > think that it will be kept because without it the remaining (zero)
> segments
> > will be below the log retention size - is that correct?
> >
> > liam
> >
> > --
> > Liam Stewart :: liam.stewart@gmail.com
> >
>
>
>
> --
> Liam Stewart :: liam.stewart@gmail.com
>

Re: log retention and a single log file

Posted by Liam Stewart <li...@gmail.com>.
And the next question is, what happens when only the time based policy is
enabled?

On Mon, Oct 8, 2012 at 10:23 AM, Liam Stewart <li...@gmail.com>wrote:

> What will Kafka do if a topic has a single log segment smaller than the
> retention size but is eligible for deletion based on retention time? I
> think that it will be kept because without it the remaining (zero) segments
> will be below the log retention size - is that correct?
>
> liam
>
> --
> Liam Stewart :: liam.stewart@gmail.com
>



-- 
Liam Stewart :: liam.stewart@gmail.com