showuon commented on pull request #10509: URL: https://github.com/apache/kafka/pull/10509#issuecomment-829025045
@ableegoldman , I've addressed all your comments, and have some code refactor. What I did are: 1. remove `sortedAllPartitions` to save memory 2. put all logic related to `getUnassignedPartitions` into `getUnassignedPartitions` method to make the `constrainedAssign` clear. So now, in `getUnassignedPartitions`, when the`assignedPartitions` is empty, we'll just return `getAllTopicPartitions` (rename from `getTopicPartitions`), otherwise, we compute the difference set of sorted all partitions and sorted assigned partitions. 3. refactor step 2 to loop through all `unassignedPartitions`, and then assign each partition to unfilledMember 1 by 1. 4. other code refactor Please help review again. Thank you. -- 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