You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "jolshan (via GitHub)" <gi...@apache.org> on 2023/06/20 15:34:28 UTC

[GitHub] [kafka] jolshan commented on a diff in pull request #13447: MINOR: Change ordering of checks to prevent log spam on metadata updates

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


##########
clients/src/main/java/org/apache/kafka/clients/Metadata.java:
##########
@@ -399,8 +399,13 @@ 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);
+                if (oldTopicId != null) {
+                    log.info("Resetting the last seen epoch of partition {} to {} since the associated topicId changed from {} to {}",
+                            tp, newEpoch, oldTopicId, topicId);
+                } else {
+                    log.debug("Resetting the last seen epoch of partition {} to {} since the associated topicId was undefined but is now set to {}",

Review Comment:
   The change should remove the logging on startup. Which is where the main noise was found (ie, null to having a topic ID)
   
   Are you still seeing that log message? If so which version are you running on?



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org