Jason Gustafson created KAFKA-8841: -------------------------------------- Summary: Optimize Partition.maybeIncrementLeaderHW Key: KAFKA-8841 URL: https://issues.apache.org/jira/browse/KAFKA-8841 Project: Kafka Issue Type: Improvement Reporter: Jason Gustafson Assignee: Jose Armando Garcia Sancio
We've observed a noticeable cost in `Partition.maybeIncrementLeaderHW` during profiling. Basically just all the unnecessary collection copies and iterations over the replica set. Since this is on the hot path for handling follower fetches, we should probably put some effort into optimizing this. A couple ideas: # Don't do all those copies. # Checking whether hw needs incrementing is not necessary unless an end offset actually changed -- This message was sent by Atlassian Jira (v8.3.2#803003)