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

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

GitHub user becketqin opened a pull request:

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

    KAFKA-4734; Trim the time index on old segments

    

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

    $ git pull https://github.com/becketqin/kafka KAFKA-4734

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

    https://github.com/apache/kafka/pull/2501.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 #2501
    
----
commit c77900a66ab9464f54fdb828299d57589e7939bd
Author: Jiangjie Qin <[email protected]>
Date:   2017-02-04T06:39:00Z

    KAFKA-4734; Trim the time index on old segments

----


> timeindex on old segments not trimmed to actual size 
> -----------------------------------------------------
>
>                 Key: KAFKA-4734
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4734
>             Project: Kafka
>          Issue Type: Improvement
>    Affects Versions: 0.10.1.0
>            Reporter: Jun Rao
>            Assignee: Jiangjie Qin
>
> When upgrading from 0.9.0 to 0.10.1, the broker creates empty .timeindex 
> files on old log segments without trimming them. So, on disk, you will see 
> .timeindex files with preallocated size.
> -rw-r--r--  1 junrao  wheel  10485756 Feb  3 15:15 
> 00000000000000000000.timeindex
> -rw-r--r--  1 junrao  wheel  10485756 Feb  3 15:15 
> 00000000000000000960.timeindex
> -rw-r--r--  1 junrao  wheel  10485756 Feb  3 15:15 
> 00000000000000001920.timeindex
> -rw-r--r--  1 junrao  wheel  10485756 Feb  3 15:15 
> 00000000000000002880.timeindex
> -rw-r--r--  1 junrao  wheel  10485756 Feb  3 15:15 
> 00000000000000003840.timeindex
> -rw-r--r--  1 junrao  wheel  10485760 Feb  3 15:15 00000000000000004800.index
> -rw-r--r--  1 junrao  wheel  10485756 Feb  3 15:15 
> 00000000000000004800.timeindex
> If the broker is restarted again, all .timeindex files (except for the one on 
> the active segment) are trimmed to 0 size. It would be better if we do that 
> in the first place.



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

Reply via email to