dajac commented on code in PR #23883:
URL: https://github.com/apache/kafka/pull/23883#discussion_r4348906343
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/GroupSpecBuilder.java:
##########
@@ -261,15 +242,8 @@ public GroupSpec build() {
))
);
- Map<Uuid, Map<Integer, String>> invertedTargetAssignment =
this.invertedTargetAssignment;
Optional<Map<Uuid, Set<Integer>>> topicAssignablePartitionsMap =
this.topicAssignablePartitionsMap;
if (assignorOffload) {
- Map<Uuid, Map<Integer, String>> invertedTargetAssignmentCopy =
Utils.newHashMap(invertedTargetAssignment.size());
- for (Map.Entry<Uuid, Map<Integer, String>> entry :
invertedTargetAssignment.entrySet()) {
- invertedTargetAssignmentCopy.put(entry.getKey(),
Map.copyOf(entry.getValue()));
- }
- invertedTargetAssignment = invertedTargetAssignmentCopy;
-
if (topicAssignablePartitionsMap.isPresent()) {
Review Comment:
> Whereas the same principle doesn't hold for a Map.
This is fair. We could wrap the Map to make it clearer, I guess.
--
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]