Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4734

timeindex on old segments not trimmed to actual size

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.1.0
    • 0.10.2.0
    • None
    • None

    Description

      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-rr- 1 junrao wheel 10485756 Feb 3 15:15 00000000000000000000.timeindex
      rw-rr- 1 junrao wheel 10485756 Feb 3 15:15 00000000000000000960.timeindex
      rw-rr- 1 junrao wheel 10485756 Feb 3 15:15 00000000000000001920.timeindex
      rw-rr- 1 junrao wheel 10485756 Feb 3 15:15 00000000000000002880.timeindex
      rw-rr- 1 junrao wheel 10485756 Feb 3 15:15 00000000000000003840.timeindex
      rw-rr- 1 junrao wheel 10485760 Feb 3 15:15 00000000000000004800.index
      rw-rr- 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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            becket_qin Jiangjie Qin
            junrao Jun Rao
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment