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

Producer state is needlessly rebuilt on startup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • None
    • None

    Description

      When we find a .swap file on startup, we typically want to rename and replace it as .log.index.timeindex, etc. as a way to complete any ongoing replace operations. These swap files are usually known to have been flushed to disk before the replace operation begins.

      One flaw in the current logic is that when we recover these swap files on startup, we end up truncating the producer state and rebuild it from scratch. This is unneeded as the replace operation does not mutate the producer state by itself. It is only meant to replace the .log file along with corresponding indices.

      Because of this unneeded producer state rebuild operation, we have seen multi-hour startup times for clusters that have large compacted topics.

      Attachments

        Activity

          People

            tson Cong Ding
            dhruvilshah Dhruvil Shah
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: