[ 
https://issues.apache.org/jira/browse/KAFKA-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487947#comment-13487947
 ] 

Jun Rao commented on KAFKA-596:
-------------------------------

The fix is to set LogSegment.firstAppendTime to none if we truncate the segment 
to size 0. However, this brings up the deeper question of how do we prevent 
segments with identical starting offset from being created during log roll? 
Maybe, we should add a check in log.roll to guard this.
                
> LogSegment.firstAppendTime not reset after truncate to
> ------------------------------------------------------
>
>                 Key: KAFKA-596
>                 URL: https://issues.apache.org/jira/browse/KAFKA-596
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>              Labels: bugs
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, we don't reset LogSegment.firstAppendTime after the segment is 
> truncated. What can happen is that we truncate the segment to size 0 and on 
> next append, a new log segment with the same starting offset is rolled 
> because the time-based rolling is triggered.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to