lucasbru commented on code in PR #24216:
URL: https://github.com/apache/kafka/pull/24216#discussion_r4584793029
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -2241,8 +2241,14 @@ private CoordinatorResult<StreamsGroupHeartbeatResult,
CoordinatorRecord> stream
if (reconfigureTopology || group.configuredTopology().isEmpty()) {
log.info("[GroupId {}][MemberId {}] Configuring the topology
{}", groupId, memberId, updatedTopology.topologyEpoch());
+ Optional<Boolean> wasReady =
group.configuredTopology().map(ConfiguredTopology::isReady);
updatedConfiguredTopology =
InternalTopicManager.configureTopics(log, groupId, memberId, metadataHash,
updatedTopology, metadataImage, time);
group.setConfiguredTopology(updatedConfiguredTopology);
+ // No endpoint information is reported while the topology is
not ready, so members must refetch it
+ // when the topology becomes ready or stops being ready, even
if no assignment changes.
+ if (wasReady.isPresent() && wasReady.get() !=
updatedConfiguredTopology.isReady()) {
+
group.setEndpointInformationEpoch(group.endpointInformationEpoch() + 1);
Review Comment:
Good point, I think that gap is real. The epoch is soft state that restarts
at 0 on every coordinator load, and nothing in replay brings it back, so after
a failover a client's epoch can match by coincidence and it won't refetch. It
affects any stale mapping, not just an empty one, and it exists on trunk today,
so I'd leave it out of this PR. Sending each member the mapping on its first
heartbeat after load would close it, if someone wants to pick that up.
--
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]