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

ASF GitHub Bot commented on KAFKA-4972:
---------------------------------------

GitHub user ijuma opened a pull request:

    https://github.com/apache/kafka/pull/4016

    MINOR: Simplify log cleaner and fix compiler warnings

    - Simplify LogCleaner.cleanSegments and add comment regarding thread
    unsafe usage of `LogSegment.append`. This was a result of investigating
    KAFKA-4972.
    - Fix compiler warnings.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ijuma/kafka 
simplify-log-cleaner-and-fix-warnings

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/4016.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4016
    
----
commit 3b26b21c4a41b9857d48a09a63a560228924df4f
Author: Ismael Juma <ism...@juma.me.uk>
Date:   2017-10-04T13:57:03Z

    Simplify LogCleaner.cleanSegments and add comment regarding thread unsafe 
usage of `LogSegment.append`

commit a1e50d8fbffc977646397f0446efeaa798816d87
Author: Ismael Juma <ism...@juma.me.uk>
Date:   2017-10-04T13:57:20Z

    Fix compiler warnings

----


> Kafka 0.10.0  Found a corrupted index file during Kafka broker startup
> ----------------------------------------------------------------------
>
>                 Key: KAFKA-4972
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4972
>             Project: Kafka
>          Issue Type: Bug
>          Components: log
>    Affects Versions: 0.10.0.0
>         Environment: JDK: HotSpot  x64  1.7.0_80
> Tag: 0.10.0
>            Reporter: fangjinuo
>            Priority: Critical
>             Fix For: 1.0.0, 0.11.0.2
>
>         Attachments: Snap3.png
>
>
> -deleted text-After force shutdown all kafka brokers one by one, restart them 
> one by one, but a broker startup failure.
> The following WARN leval log was found in the log file:
> found a corrutped index file,  xxxx.index , delet it  ...
> you can view details by following attachment.
> ~I look up some codes in core module, found out :
> the nonthreadsafe method LogSegment.append(offset, messages)  has tow caller:
> 1) Log.append(messages)                          // here has a synchronized 
> lock 
> 2) LogCleaner.cleanInto(topicAndPartition, source, dest, map, retainDeletes, 
> messageFormatVersion)   // here has not 
> So I guess this may be the reason for the repeated offset in 00000xx.log file 
> (logsegment's .log) ~
> Although this is just my inference, but I hope that this problem can be 
> quickly repaired



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to