[ https://issues.apache.org/jira/browse/KAFKA-15511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17769525#comment-17769525 ]
Arpit Goyal commented on KAFKA-15511: ------------------------------------- [~divijvaidya] Can you review this https://github.com/apache/kafka/pull/14459/files > 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 > Affects Versions: 3.6.0 > Reporter: Arpit Goyal > Assignee: Arpit Goyal > Priority: Major > Fix For: 3.7.0 > > 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)