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

Kafka retention hour is not working

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: log
    • Labels:

      Description

      Kafka log cannot be deleted after the configured retention hours (12 hours for log retention). 

       

      What's our Kafka cluster look like?

      There are 6 brokers deployed with Kafka version 1.1.1.

       

      Is it reproducible?
      I am not sure since our Kafka cluster is working well over 1.5 years without retention issue until 4/13/2019 ~ 4/20/2019.  

       

      is it related to the active segment?
      as I know Kafka will not delete an active segment, my case those old logs are not activated, they should be inactivated. 

       

      What's the current status?

      Those old logs have been deleted after I manually ran rolling restart Kafka servers with retention hours adjustment (Ideally I tried this solution aimed to force retention hours work, not really want to adjust the retention hours, finally the solution it's working, but not immediately, I remember the retention start work after couples of hours after applying the change and rolling restart Kafka servers.), now our Kafka storage is back to normal, please check the screenshot attached with this ticket.

      A sample old log added here for better understanding of the retention hours not working issue.

      ```

      // it has been there from 4/12
      rw-rr- 1 root root 136866627 Apr 12 04:33 00000000002581377820.log 

      // It was still being opened by Kafka when I check it with the tool lsof on 4/19/2019 before server rolling restart with retention hours adjustment.
      java 20281 0 1678u REG 202,32 136866627 1074562295 /kafka/data/.../00000000002581377820.log
      ```

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tony2011 Jiangtao Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: