Cong Ding created KAFKA-13603: --------------------------------- Summary: 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
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)