Arpit Goyal created KAFKA-15511: ----------------------------------- Summary: Exception not handled correctly if indexFile is corrupted. Key: KAFKA-15511 URL: https://issues.apache.org/jira/browse/KAFKA-15511 Project: Kafka Issue Type: Bug Reporter: Arpit Goyal Assignee: Arpit Goyal Attachments: Screenshot 2023-09-27 at 1.01.58 PM.png, Screenshot 2023-09-27 at 1.14.22 PM.png
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] -- This message was sent by Atlassian Jira (v8.20.10#820010)