[ https://issues.apache.org/jira/browse/KAFKA-8899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16928013#comment-16928013 ]
ASF GitHub Bot commented on KAFKA-8899: --------------------------------------- lbradstreet commented on pull request #7324: [WIP] KAFKA-8899: avoid unnecessary collection generation in Partition.maybeIncrementLeaderHW URL: https://github.com/apache/kafka/pull/7324 *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 to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Optimize Partition.maybeIncrementLeaderHW > ----------------------------------------- > > Key: KAFKA-8899 > URL: https://issues.apache.org/jira/browse/KAFKA-8899 > Project: Kafka > Issue Type: Task > Components: core > Affects Versions: 2.3.0, 2.2.1 > Reporter: Lucas Bradstreet > Priority: Major > > Partition.maybeIncrementLeaderHW is in the hot path for > ReplicaManager.updateFollowerFetchState. When replicating between brokers > with high partition counts, maybeIncrementLeaderHW becomes expensive, with > much of the time going to calling Partition.remoteReplicas which performs a > toSet conversion. maybeIncrementLeaderHW should avoid generating any > intermediate collections when calculating the new HWM. -- This message was sent by Atlassian Jira (v8.3.2#803003)