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

Exception not handled correctly if indexFile is corrupted.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.6.0
    • 3.6.0, 3.7.0
    • Tiered-Storage
    • None

    Description

      I was simulating a code flow where there is a possibility of inconsistency between RemoteCache and fileStored on disk.

      1. OffsetIndex Corrupt File already exist on disk
      2. There is no entry exist in the RemoteIndexCache
      3. Call getIndexEntry
      4. As File already exists on the disk and corrupted , indexSanityCheck will throws "CorruptIndexException"

      5. But the code flow in RemoteIndexCache catches only "CorruptRecordException".

      Ideally it should catch CorruptIndexException instead of CorruptRecordException.

      Impact - Functionality is break on the above code flow , and it will not able to auto-recover and overwriting the corrupted index file.

      Check the screenshot attached for more reference.

      cc divijvaidya satish.duggana

      Attachments

        1. Screenshot 2023-09-27 at 1.01.58 PM.png
          148 kB
          Arpit Goyal
        2. Screenshot 2023-09-27 at 1.14.22 PM.png
          277 kB
          Arpit Goyal

        Issue Links

          Activity

            People

              goyarpit Arpit Goyal
              goyarpit Arpit Goyal
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: