jolshan commented on code in PR #12541:
URL: https://github.com/apache/kafka/pull/12541#discussion_r1028468986


##########
clients/src/main/java/org/apache/kafka/clients/Metadata.java:
##########
@@ -399,9 +399,11 @@ private Optional<MetadataResponse.PartitionMetadata> 
updateLatestMetadata(
                 // Between the time that a topic is deleted and re-created, 
the client may lose track of the
                 // corresponding topicId (i.e. `oldTopicId` will be null). In 
this case, when we discover the new
                 // topicId, we allow the corresponding leader epoch to 
override the last seen value.
-                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);
+                if (!Objects.equals(currentEpoch, newEpoch)) {

Review Comment:
   I'm wondering though if using a primitive and an Integer is ok here. Maybe 
we can just compare the value of currentEpoch?



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

Reply via email to