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

When resize the index file, maybe caused the content disappear

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.10.2.1
    • None
    • core, log
    • None
    • Patch, Important

    Description

      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".

      Attachments

        Activity

          People

            Unassigned Unassigned
            xuzq_zander ZanderXu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: