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

empty active segment can trigger recovery after clean shutdown and restart

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              ccding Cong Ding
              ccding Cong Ding
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: