[
https://issues.apache.org/jira/browse/KAFKA-13603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jun Rao resolved KAFKA-13603.
-----------------------------
Fix Version/s: 3.2.0
Resolution: Fixed
merged the PR to trunk.
> empty active segment can trigger recovery after clean shutdown and restart
> --------------------------------------------------------------------------
>
> Key: KAFKA-13603
> URL: https://issues.apache.org/jira/browse/KAFKA-13603
> Project: Kafka
> Issue Type: Bug
> Reporter: Cong Ding
> Assignee: Cong Ding
> Priority: Minor
> Fix For: 3.2.0
>
>
> Within a LogSegment, the TimeIndex and OffsetIndex are lazy indices that
> don't get created on disk until they are accessed for the first time. If the
> active segment is empty at the time of the clean shutdown, the disk will have
> only the log file but no index files.
> However, Log recovery logic expects the presence of an offset index file on
> disk for each segment, otherwise, the segment is considered corrupted.
> We need to address this issue: create the index files for empty active
> segments during clean shutdown.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)