coderbruis opened a new pull request, #22633:
URL: https://github.com/apache/kafka/pull/22633

   This PR optimizes cooperative assignment validation in ConsumerCoordinator.
   
   Avoid HashSet.removeAll(List) in 
ConsumerCoordinator.validateCooperativeAssignment
   because it may repeatedly call List.contains and degrade to `O(n^2)` time
   complexity. Use explicit HashSet removals to keep the added/revoked partition
   calculation linear in the number of old owned and newly assigned partitions.
   
   Tests:
   ./gradlew clients:test --tests '*ConsumerCoordinatorTest'
   ./gradlew clients:test --tests '*CooperativeConsumerCoordinatorTest'


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to