nicktelford commented on code in PR #13993: URL: https://github.com/apache/kafka/pull/13993#discussion_r1265323056
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java: ########## @@ -119,6 +119,7 @@ public final class ConsumerCoordinator extends AbstractCoordinator { private Set<String> joinedSubscription; private MetadataSnapshot metadataSnapshot; private MetadataSnapshot assignmentSnapshot; + private boolean metadataUpdated; Review Comment: That's interesting, although I suspect that may be more of a problem with `ConcurrentLinkedHash(Map|Set)` than `LinkedHash(Map|Set)`, because I would expect the doubly-linked list may require some locking or atomic heroics to make safe. I did want to create a JMH micro-benchmark to test this, but I really struggled to do so because `MetadataSnapshot` and `PartitionRackInfo` are `private`, and micro-benchmarking the entire `ConsumerCoordinator` would require lots of mocking. I might just remove the `private` modifier to enable the benchmark, temporarily, and not include it in these changes. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org