huxihx created KAFKA-6429:
-----------------------------
Summary: dirtyNonActiveSegments in `cleanableOffsets` should only
be created when log.cleaner.min.compaction.lag.ms > 0
Key: KAFKA-6429
URL: https://issues.apache.org/jira/browse/KAFKA-6429
Project: Kafka
Issue Type: Bug
Components: log
Affects Versions: 1.0.0
Reporter: huxihx
Assignee: huxihx
LogCleanerManager.cleanableOffsets always created objects to hold all dirty
non-active segments, as shown below:
{code:java}
// dirty log segments
val dirtyNonActiveSegments = log.logSegments(firstDirtyOffset,
log.activeSegment.baseOffset)
{code}
Actually, these objects will not be used when
`log.cleaner.min.compaction.lag.ms` is 0 which is already the default value. We
could defer the creation. In doing so can we reduce the heap size but also
avoid the blocking access to the segments incurred by Log.segments.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)