kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5326) Log offset index resize cause empty index file
Date Thu, 25 May 2017 13:57:04 GMT

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

ASF GitHub Bot commented on KAFKA-5326:

GitHub user ZanderXu reopened a pull request:



    This modify to resolved the [KAFKA-5326](https://issues.apache.org/jira/browse/KAFKA-5326).

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

    $ git pull https://github.com/ZanderXu/kafka trunk

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


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

    This closes #3143
commit 0be6d5b1397443f2d6bb953ecd1cd13e31abd4fd
Author: xuzq <xuzq>
Date:   2017-05-25T13:26:38Z

    to resolved the KAFKA-5326


> Log offset index  resize cause empty  index file
> ------------------------------------------------
>                 Key: KAFKA-5326
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5326
>             Project: Kafka
>          Issue Type: Bug
>          Components: core, log
>    Affects Versions:
>            Reporter: Ma Tianchi
> After a log index file lost or be removed when kafka server is running,then some one
calls OffsetIndex.resize(newSize: Int) .It will cause a new index file be created but there
is no values in it,even though the size is same with old one.
> It will do something as below. 
> val raf = new RandomAccessFile(file, "rw")
> This time file does not exit.It will create a new file.
> Then at:
> mmap = raf.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, roundedNewSize)
> The mmap is created from new file which is empty.
> and then:
> mmap.position(position)
> This make the new index file which size is same with old index file,but there is nothing
in it.

This message was sent by Atlassian JIRA

View raw message