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

Log compaction with preallocation enabled does not trim segments

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.10.1.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux, Windows

      Description

      Unexpected behavior occurs when a topic is configured to preallocate files and has a retention policy of compact.

      When log compaction runs, the cleaner attempts to gather groups of segments to consolidate based on the max segment size.
      When preallocation is enabled all segments are that size and thus each individual segment is considered for compaction.

      When compaction does occur, the resulting cleaned file is sized based on that same configuration. This means that you can have very large files on disk that contain little or no data which partly defeats the point of compacting.

      The log cleaner should trim these segments to free up disk space. That way they would free up disk space and be able to be further compacted on subsequent runs.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jaliyetti Jason Aliyetti
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: