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

Add timestamp-based log deletion policy

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • log

    Description

      One of Kafka's officially-described use cases is a distributed commit log (http://kafka.apache.org/documentation.html#uses_commitlog). In this case, for a distributed service that needed a commit log, there would be a topic with a single partition to guarantee log order. This service would use the commit log to re-sync failed nodes. Kafka is generally an excellent fit for such a system, but it does not expose an adequate mechanism for log cleanup in such a case. With a distributed commit log, data can only be deleted when the client application determines that it is no longer needed; this creates completely arbitrary ranges of time and size for messages, which the existing cleanup mechanisms can't handle smoothly.
      A new deletion policy based on the absolute timestamp of a message would work perfectly for this case. The client application will periodically update the minimum timestamp of messages to retain, and Kafka will delete all messages earlier than that timestamp using the existing log cleaner thread mechanism.
      This is based off of the work being done in KIP-32 - Add timestamps to Kafka message.

      Initial Approach

      https://github.com/apache/kafka/compare/trunk...bill-warshaw:KAFKA-3224

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wwarshaw Bill Warshaw
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: