mjsax commented on code in PR #22788:
URL: https://github.com/apache/kafka/pull/22788#discussion_r3642326897
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/TargetAssignmentBuilder.java:
##########
@@ -291,16 +298,25 @@ private TasksTuple newMemberAssignment(
) {
MemberAssignment newMemberAssignment =
newGroupAssignment.members().get(memberId);
if (newMemberAssignment != null) {
+ // Copy the maps returned by the assignor so the server does not
keep a reference to
+ // maps the assignor is free to mutate afterwards.
return new TasksTuple(
- newMemberAssignment.activeTasks(),
- newMemberAssignment.standbyTasks(),
- newMemberAssignment.warmupTasks()
+ copyTasks(newMemberAssignment.activeTasks()),
+ copyTasks(newMemberAssignment.standbyTasks()),
+ // Warm-up tasks are not assigned by the assignor; they are
decided during reconciliation.
+ Map.of()
Review Comment:
```suggestion
new HashMap()
```
--
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]