mjsax commented on code in PR #23969:
URL: https://github.com/apache/kafka/pull/23969#discussion_r4594313777
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/AssignmentRefinerImpl.java:
##########
@@ -158,6 +168,9 @@ static CurrentAssignmentIndex indexCurrentAssignment(
subtopologies,
task -> reportedByProcess.computeIfAbsent(member.processId(),
__ -> new HashSet<>()).add(task)
);
+
+ memberCounts.merge(member.processId(), 1, Integer::sum);
+ statefulTaskCounts.merge(member.processId(), statefulTaskCount[0],
Integer::sum);
Review Comment:
We have similar code through the refiner, and I am wondering if using
`merge` with `Integer::sum` is really efficient code? Did not read the full PR
yet, not the second PR, so maybe it's something you do later? Or did we
benchmark this already and know we cannot gain anything if we would rewrite.
Just curious. Ok to leave as-if on this 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]