[ 
https://issues.apache.org/jira/browse/KAFKA-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jay Kreps updated KAFKA-551:
----------------------------

    Attachment: KAFKA-551.patch

Attached patch removes mutable flag from offset index and log file. I think 
this actually turns out to simplify the code a bit since there was lots of 
casewise logic.

The downside is that it is now possible to append to the wrong  log segment 
which would have previously thrown a helpful exception and now would silently 
succeed.

It would be possible to improve this situation in the future by (1) completing 
the refactor of log to only reference index and file message set through the 
LogSegment class, and (2) adding a mutable flag in the log segment and checking 
that on all mutations.
                
> Log.truncateTo() may need to trucate immutable log segment
> ----------------------------------------------------------
>
>                 Key: KAFKA-551
>                 URL: https://issues.apache.org/jira/browse/KAFKA-551
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>            Priority: Blocker
>              Labels: bugs
>         Attachments: KAFKA-551.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> In makeFollower, we need to first truncate the local log to high watermark. 
> It's possible that we need to truncate into segments before the last one. The 
> problem is that all segments except the last one are immutable. So the 
> truncation will fail which prevents the replica fetcher from being started.
> One solution is to reopen the segment as mutable during truncation, if it's 
> not mutable already.

--
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