kirktrue commented on code in PR #16686:
URL: https://github.com/apache/kafka/pull/16686#discussion_r1833353097
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventProcessor.java:
##########
@@ -239,10 +243,13 @@ private void process(final AssignmentChangeEvent event) {
manager.maybeAutoCommitAsync();
}
- log.info("Assigned to partition(s): {}",
event.partitions().stream().map(TopicPartition::toString).collect(Collectors.joining(",
")));
+ Collection<TopicPartition> partitions = event.partitions();
+ log.info("Assigned to partition(s): {}",
partitions.stream().map(TopicPartition::toString).collect(Collectors.joining(",
")));
try {
- if (subscriptions.assignFromUser(new
HashSet<>(event.partitions())))
+ if (subscriptions.assignFromUser(new HashSet<>(partitions))) {
metadata.requestUpdateForNewTopics();
+ requestManagers.consumerMembershipManager.ifPresent(cmm ->
cmm.notifyAssignmentChange(new HashSet<>(partitions)));
Review Comment:
Good catch. I've made the snapshot targeted only for consumer group members.
I'd love for it to be more general, but this is the right call. PTAL at the
changes when you have the time. Thanks!
--
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]