hachikuji commented on a change in pull request #7222: URL: https://github.com/apache/kafka/pull/7222#discussion_r467143222
########## File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java ########## @@ -1120,17 +1123,28 @@ Node selectReadReplica(TopicPartition partition, Node leaderReplica, long curren } } + /** + * If we have seen new metadata (as tracked by {@link org.apache.kafka.clients.Metadata#updateVersion()}), then + * we should check that all of the assignments have a valid position. + */ + private void maybeValidateAssignments() { Review comment: The name here threw me off because of its generality. I think we need to work metadata into the name to make it clearer. Maybe `validatePositionsOnMetadataChange` or `validatePositionsForLeaderChanges`. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org