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

Due to OS caching Kafka might loose offset files which causes full reset of data

    XMLWordPrintableJSON

    Details

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

      Description

      Seen this while testing power failure and disk failures. Due to chaching on OS level (eg. XFS can cache data for 30 seconds) after failure we got offset files of zero length. This dramatically slows down broker startup (it have to re-check all segments) and if high watermark offsets lost it simply erases all data and start recovering from other brokers (looks funny - first spending 2-3 hours re-checking logs and then deleting them all due to missing high watermark).

      Proposal: introduce offset files rotation. Keep two version of offset file, write to oldest, read from the newest valid. In this case we would be able to configure offset checkpoint time in a way that at least one file is alway flushed and valid.

        Attachments

        1. KAFKA-1539.patch
          1 kB
          Jay Kreps

          Activity

            People

            • Assignee:
              jkreps Jay Kreps
              Reporter:
              dmitrybugaychenko Dmitry Bugaychenko
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: