You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "xuzq (JIRA)" <ji...@apache.org> on 2017/05/26 12:52:04 UTC

[jira] [Issue Comment Deleted] (KAFKA-5332) When resize the index file, maybe caused the content disappear

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

xuzq updated KAFKA-5332:
------------------------
    Comment: was deleted

(was: [~junrao] )

> When resize the index file, maybe caused the content disappear
> --------------------------------------------------------------
>
>                 Key: KAFKA-5332
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5332
>             Project: Kafka
>          Issue Type: Bug
>          Components: core, log
>    Affects Versions: 0.10.2.1
>            Reporter: xuzq
>
> When resize the index file, maybe caused the content disappear.
> When the kafka server is running, someone removed the index file on the disk manually, if at this point, the function AbstractIndex.Resize(newSize: Int) is triggered, it will create a new .index file which the size is 
> roundedNewSize, but the content is empty. 
> After this, the contents of mmap is empty. 
> When looking for specific offset corresponds to position, it also return zero. The index file to locate the position does not provide any convenience.
> I think if the ".index" is not exist, we should copy the contents from old "mmap" to new "mmap" to avoid the "empty file".



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)