cadonna commented on a change in pull request #11760: URL: https://github.com/apache/kafka/pull/11760#discussion_r811402366
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/TaskMovement.java ########## @@ -56,25 +54,34 @@ private int numCaughtUpClients() { return caughtUpClients.size(); } - private static boolean taskIsNotCaughtUpOnClientAndOtherCaughtUpClientsExist(final TaskId task, - final UUID client, - final Map<TaskId, SortedSet<UUID>> tasksToCaughtUpClients) { - return !taskIsCaughtUpOnClientOrNoCaughtUpClientsExist(task, client, tasksToCaughtUpClients); + private static boolean taskIsNotCaughtUpOnClientAndOtherMoreCaughtUpClientsExist(final TaskId task, + final UUID client, + final Map<UUID, ClientState> clientStates, + final Map<TaskId, SortedSet<UUID>> tasksToCaughtUpClients, + final Map<TaskId, List<UUID>> tasksToClientByLag) { Review comment: Would it be possible to use a `SortedSet` instead of a `List` here. Would make it clearer that client IDs should only appear once in this list. ########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/TaskMovement.java ########## @@ -56,25 +54,34 @@ private int numCaughtUpClients() { return caughtUpClients.size(); } - private static boolean taskIsNotCaughtUpOnClientAndOtherCaughtUpClientsExist(final TaskId task, - final UUID client, - final Map<TaskId, SortedSet<UUID>> tasksToCaughtUpClients) { - return !taskIsCaughtUpOnClientOrNoCaughtUpClientsExist(task, client, tasksToCaughtUpClients); + private static boolean taskIsNotCaughtUpOnClientAndOtherMoreCaughtUpClientsExist(final TaskId task, + final UUID client, + final Map<UUID, ClientState> clientStates, + final Map<TaskId, SortedSet<UUID>> tasksToCaughtUpClients, + final Map<TaskId, List<UUID>> tasksToClientByLag) { Review comment: Would it be possible to use a `SortedSet` instead of a `List` here? Would make it clearer that client IDs should only appear once in this list. -- 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