You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jason Aliyetti (JIRA)" <ji...@apache.org> on 2017/07/11 19:38:00 UTC

[jira] [Created] (KAFKA-5582) Log compaction with preallocation enabled does not trim segments

Jason Aliyetti created KAFKA-5582:
-------------------------------------

             Summary: Log compaction with preallocation enabled does not trim segments
                 Key: KAFKA-5582
                 URL: https://issues.apache.org/jira/browse/KAFKA-5582
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 0.10.1.1
         Environment: Linux, Windows
            Reporter: Jason Aliyetti


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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)