AndrewJSchofield commented on code in PR #14111: URL: https://github.com/apache/kafka/pull/14111#discussion_r1315868466
########## clients/src/main/java/org/apache/kafka/clients/Metadata.java: ########## @@ -408,11 +463,13 @@ private Optional<MetadataResponse.PartitionMetadata> updateLatestMetadata( log.info("Resetting the last seen epoch of partition {} to {} since the associated topicId changed from {} to {}", tp, newEpoch, oldTopicId, topicId); lastSeenLeaderEpochs.put(tp, newEpoch); + this.equivalentResponseCount = 0; return Optional.of(partitionMetadata); } else if (newEpoch >= currentEpoch) { // If the received leader epoch is at least the same as the previous one, update the metadata log.debug("Updating last seen epoch for partition {} from {} to epoch {} from new metadata", tp, currentEpoch, newEpoch); lastSeenLeaderEpochs.put(tp, newEpoch); + this.equivalentResponseCount = 0; Review Comment: Done -- 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