Kafka
  1. Kafka
  2. KAFKA-179

Log files always touched when broker is bounced

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Implemented
    • Affects Version/s: None
    • Fix Version/s: 0.8.2.0
    • Component/s: core
    • Labels:

      Description

      It looks like the latest log segment is always touched when the broker upon start-up regardless of whether it has corrupt data or not, which fudges the segment's mtime. Minor issue, but I found it a bit misleading when trying to verify a log cleanup setting in production. I think it should be as simple as adding a guard in FileMessageSet's recover method to skip truncate if validUpTo == the length of the segment. Will test this later.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        954d 23h 46m 1 Joel Koshy 12/Jun/14 23:02
        Resolved Resolved Closed Closed
        25s 1 Joel Koshy 12/Jun/14 23:02
        Joel Koshy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Raul Castro Fernandez [ raulcf ]
        Joel Koshy made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Implemented [ 10 ]
        Hide
        Joel Koshy added a comment -

        Cool - thanks for checking.

        Show
        Joel Koshy added a comment - Cool - thanks for checking.
        Hide
        Raul Castro Fernandez added a comment -

        Should I mark it as solved?

        Show
        Raul Castro Fernandez added a comment - Should I mark it as solved?
        Hide
        Raul Castro Fernandez added a comment -

        Just tried it. It seems that it is already fixed. After creating a couple of topics and reinitialising the brokers a couple of times, the mtime of the log and index files does not change.

        Show
        Raul Castro Fernandez added a comment - Just tried it. It seems that it is already fixed. After creating a couple of topics and reinitialising the brokers a couple of times, the mtime of the log and index files does not change.
        Hide
        Joel Koshy added a comment -

        It might have been fixed in KAFKA-615. Maybe you can do a quick test to confirm and close this as resolved-implemented.

        Show
        Joel Koshy added a comment - It might have been fixed in KAFKA-615 . Maybe you can do a quick test to confirm and close this as resolved-implemented.
        Hide
        Raul Castro Fernandez added a comment -

        The function recoverLog() in Log.scala checks whether the log has the CleanShutdownMarker. If it exists, then it returns without touching any MessageSet (lines 173-176). Does the description of the JIRA refers to this function?

        Show
        Raul Castro Fernandez added a comment - The function recoverLog() in Log.scala checks whether the log has the CleanShutdownMarker. If it exists, then it returns without touching any MessageSet (lines 173-176). Does the description of the JIRA refers to this function?
        Neha Narkhede made changes -
        Fix Version/s 0.8.2 [ 12326167 ]
        Fix Version/s 0.8.1 [ 12322960 ]
        Joe Stein made changes -
        Fix Version/s 0.8.1 [ 12322960 ]
        Fix Version/s 0.8 [ 12317244 ]
        Jay Kreps made changes -
        Field Original Value New Value
        Labels newbie
        Joel Koshy created issue -

          People

          • Assignee:
            Raul Castro Fernandez
            Reporter:
            Joel Koshy
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development