Copilot commented on code in PR #24216:
URL: https://github.com/apache/kafka/pull/24216#discussion_r4562593341


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/StreamsGroup.java:
##########
@@ -1578,6 +1579,11 @@ public 
List<StreamsGroupHeartbeatResponseData.EndpointToPartitions> buildEndpoin
                 "This is a bug, please file a JIRA ticket.", groupId);
             return endpointToPartitionsList;
         }
+        // While the topology is not ready, for example because source or 
internal topics are missing, the target assignment
+        // is empty, so there are no partitions to report.
+        if 
(configuredTopology().filter(ConfiguredTopology::isReady).isEmpty()) {
+            return endpointToPartitionsList;

Review Comment:
   With assignment updates delayed, an endpoint-less member can join while a 
topic is missing and receive an empty routing map even though an existing 
endpoint owner still has its tasks. If the topic recovers before those tasks 
change, the endpoint-information epoch does not advance, so the joining member 
can retain the empty map indefinitely. Advance the epoch on topology-readiness 
transitions in both directions, and add a recovery test where the endpoint 
owner's assignment stays unchanged.



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