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

Ismael Juma commented on KAFKA-5332:
------------------------------------

cc [~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)

Reply via email to