mjsax commented on code in PR #22808:
URL: https://github.com/apache/kafka/pull/22808#discussion_r3597508823


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/StreamsGroup.java:
##########
@@ -1308,7 +1308,11 @@ public StreamsGroupDescribeResponseData.DescribedGroup 
asDescribedGroup(
         members.entrySet(committedOffset).forEach(
             entry -> describedGroup.members().add(
                 entry.getValue().asStreamsGroupDescribeMember(
-                    targetAssignment.get(entry.getValue().memberId(), 
committedOffset)
+                    targetAssignment.get(entry.getValue().memberId(), 
committedOffset),
+                    // Task (end-)offsets are transient, unpersisted 
telemetry, so unlike the rest of the member state
+                    // they are read from the latest in-memory value rather 
than at committedOffset. Members that have
+                    // not reported any yield MemberTaskOffsets.EMPTY.
+                    taskOffsets(entry.getValue().memberId())

Review Comment:
   So you are saying the returned `targetAssignment` and the task-offsets might 
not match up, ie, we might return task-offsets for tasks that are not in 
`targetAssignment`?
   
   Given that the data is transient by definition, and clients might not yet 
have reported, we could maybe filter accordingly, and only return task-offsets 
for tasks in the target assignment? This way, we return at least consistent 
data, and given the transient nature, being incomplete should be fine?
   
   But it might be rather odd to report task-offset for a not-assigned tasks?



-- 
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]

Reply via email to