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

Jun Rao commented on KAFKA-1112:
--------------------------------

The following is my confusion.

The patch relies on a potentially corrupted index to find the right starting 
position in the segment file. What if the starting position given by the last 
index entry is corrupted? Then, the position could point to the middle of a 
message in the segment file. Then, the offset value we read from the segment 
file could be anything. If that value happens to match recoverPoint - 1, we 
could think no recovery is needed, but the segment file is actually corrupted. 

Similarly, even if the index file is not corrupted, the segment file could 
still be corrupted before recoverPoint - 1 (since the unit of flushing is a 
page). It's also possible that we read a corrupted piece of data as the offset 
that happens to match recoverPoint - 1, and therefore incorrectly think that 
recovery is not needed.

> broker can not start itself after kafka is killed with -9
> ---------------------------------------------------------
>
>                 Key: KAFKA-1112
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1112
>             Project: Kafka
>          Issue Type: Bug
>          Components: log
>    Affects Versions: 0.8, 0.8.1
>            Reporter: Kane Kim
>            Assignee: Jay Kreps
>            Priority: Critical
>         Attachments: KAFKA-1112-v1.patch, KAFKA-1112-v2.patch, KAFKA-1112.out
>
>
> When I kill kafka with -9, broker cannot start itself because of corrupted 
> index logs. I think kafka should try to delete/rebuild indexes itself without 
> manual intervention. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to