GitHub user huxihx opened a pull request:
https://github.com/apache/kafka/pull/3525
KAFKA-5431: cleanSegments should not set length for cleanable segment files
For a compacted topic with preallocate enabled, during log cleaning,
LogCleaner.cleanSegments does not have to pre-allocate the underlying file size
since we only want to store the cleaned data in the file.
It's believed that this fix should also solve KAFKA-5582.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/huxihx/kafka log_compact_test
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/3525.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3525
----
commit e14436a2abb25c5b324efba5e431e5e1afb6e05a
Author: huxihx <[email protected]>
Date: 2017-07-13T08:28:50Z
KAFKA-5431: LogCleaner stopped due to
org.apache.kafka.common.errors.CorruptRecordException
For a compacted topic with preallocate enabled, during log cleaning,
LogCleaner.cleanSegments does not have to pre-allocate the underlying file size
since we only want to store the cleaned data in the file.
It's believed that this fix should also solve KAFKA-5582.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---