flashmouse commented on PR #13920: URL: https://github.com/apache/kafka/pull/13920#issuecomment-1609178487
@divijvaidya thank you for reply! the unit test ``org.apache.kafka.clients.consumer.internals.AbstractStickyAssignorTest#testLargeAssignmentAndGroupWithNonEqualSubscription`` could use much more time than configured Timeout(90) and this could reproduce easy when ``partitionCount`` and ``consumerCount`` are large enough and not equal(ex. ``partitionCount``= 200, ``consumerCount``= 20), in this situation ``isBalanced`` and ``performReassignments`` may run whole loop body. because both ``performReassignments`` and ``isBalanced`` in ``AbstractStickyAssignor`` are not so efficient(``performReassignments`` is worse), ``isBalanced`` could abate ``performReassignments`` call times, so fix its logic could speed up this unit test when parameters are small enough. in my test, after this fix, ``testLargeAssignmentAndGroupWithNonEqualSubscription`` could pass when ``partitionCount``= 200, ``consumerCount`` = 20, but is still slower than the combination ``partitionCount``= 2000, ``consumerCount`` = 2000 because in this test when the 2 parameters are equal, ``isBalanced`` satisfy the prediction ``min >= max - 1`` thus could return true immediately. may be I need add a unit test code with a new commit? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org