lucasbru opened a new pull request, #20854:
URL: https://github.com/apache/kafka/pull/20854
Fix endpoint information epoch management in Streams group coordinator
This commit addresses several issues in the endpoint information epoch
handling for Streams groups:
1. Conditional epoch bumping: Only increment endpointInformationEpoch
when a member actually has a user endpoint defined, rather than on
every member update. This prevents unnecessary epoch bumps for
members without endpoints.
2. Initial epoch value: Change endpointInformationEpoch initialization
from -1 to 0 to be consistent with standard epoch semantics.
3. Response epoch handling: Only include endpointInformationEpoch in
responses when the group has been persisted, to better deal with the
case where a group is newly created but the epoch information is
not persisted (because it's soft state which is thrown away after
the execution of the first heartbeat).
4. Endpoint-to-partitions building: Refactor maybeBuildEndpointToPartitions
to consistently include both existing and new members' endpoint
information. The previous implementation did not incldue the endpoint
for a new member. Also return an empty list instead of null if the
set of endpoints actually becomes empty.
The changes ensure that endpoint information is correctly propagated to
all group members during rebalancing, including when new members join
with user endpoints. Tests updated to reflect the new behavior and a
comprehensive test added to verify endpoint information includes both
existing and new members.
--
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]