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

Log cleaner crashes when empty batches are retained with idempotent or transactional producers

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.1
    • Component/s: None
    • Labels:
      None

      Description

      During log compaction, we retain an empty header if the batch contains the last sequence number for a particular producer. When such headers are the only messages retained, we do not update state such as `maxOffset` in `MemoryRecords#filterTo` causing us to append these into the cleaned segment with `largestOffset` = -1. This throws a `LogSegmentOffsetOverflowException` for a segment that does not actually have an overflow. When we attempt to split the segment, the log cleaner dies.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dhruvilshah Dhruvil Shah
                Reporter:
                dhruvilshah Dhruvil Shah
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: