You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/01/07 03:41:00 UTC

[jira] [Commented] (KAFKA-6429) dirtyNonActiveSegments in `cleanableOffsets` should only be created when log.cleaner.min.compaction.lag.ms > 0

    [ https://issues.apache.org/jira/browse/KAFKA-6429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16315055#comment-16315055 ] 

ASF GitHub Bot commented on KAFKA-6429:
---------------------------------------

huxihx opened a new pull request #4399: KAFKA-6429: LogCleanerManager.cleanableOffsets should create objects …
URL: https://github.com/apache/kafka/pull/4399
 
 
   …for dirty non-active segments only when `log.cleaner.min.compaction.lag.ms` is greater than 0
   
   With `log.cleaner.min.compaction.lag.ms`'s default value of 0, there is no need to hold heap objects for those dirty non-active segments. This could reduce the heap size and also avoid the unnecessary monitor lock retrieval.
   
   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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)