You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lucasbru (via GitHub)" <gi...@apache.org> on 2025/12/01 16:24:04 UTC
[PR] KAFKA-19945: Always set status field in StreamsGroupHeartbeat response [kafka]
lucasbru opened a new pull request, #21031:
URL: https://github.com/apache/kafka/pull/21031
The status field should always set in the response, even when empty, to ensure that the status gets reset on the client.
We are not doing this due to an oversight - it is defined as nullable, and is null when not set. So status does not clear correctly on the client, which ignores the field if it's null.
This mostly has no effect, since we are logging the status, but it is still confusing.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-19945: Always set status field in StreamsGroupHeartbeat response [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax commented on PR #21031:
URL: https://github.com/apache/kafka/pull/21031#issuecomment-3639511393
Cherry-picked to `4.2` branch.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-19945: Always set status field in StreamsGroupHeartbeat response [kafka]
Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru merged PR #21031:
URL: https://github.com/apache/kafka/pull/21031
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-19945: Always set status field in StreamsGroupHeartbeat response [kafka]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #21031:
URL: https://github.com/apache/kafka/pull/21031#discussion_r2577806961
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -2154,9 +2154,7 @@ private CoordinatorResult<StreamsGroupHeartbeatResult, CoordinatorRecord> stream
)
));
- if (!returnedStatus.isEmpty()) {
- response.setStatus(returnedStatus);
- }
+ response.setStatus(returnedStatus);
Review Comment:
The code change to always set the `status` field will break many existing tests that don't expect `.setStatus(List.of())` in responses when there are no status messages.
Looking at the test file, there are numerous tests (e.g., `testMemberJoinsEmptyStreamsGroup` at line 16265, `testStreamsGroupHeartbeatPartialResponseWhenNothingChanges` at line 17397, `testStreamsUpdatingMemberMetadataTriggersNewTargetAssignment` at line 16986, and many others) that create expected `StreamsGroupHeartbeatResponseData` objects without calling `.setStatus()`, which means the field defaults to `null`.
After this change, the actual responses will have `.setStatus(List.of())` (an empty list), which won't equal `null`. This will cause test failures. All affected tests need to be updated to include `.setStatus(List.of())` in their expected response objects.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-19945: Always set status field in StreamsGroupHeartbeat response [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax commented on PR #21031:
URL: https://github.com/apache/kafka/pull/21031#issuecomment-3599612352
Overall makes sense to me. Guess we might want to update the KIP for this case, so that the field is not nullable any longer?
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org