dengziming commented on a change in pull request #9622: URL: https://github.com/apache/kafka/pull/9622#discussion_r544782830
########## File path: core/src/main/scala/kafka/server/MetadataCache.scala ########## @@ -314,9 +315,16 @@ class MetadataCache(brokerId: Int) extends Logging { error(s"Listeners are not identical across brokers: $aliveNodes") } + val newTopicIds = updateMetadataRequest.topicStates().asScala + .map(topicState => (topicState.topicName(), topicState.topicId())) + .filter(_._2 != Uuid.ZERO_UUID).toMap + val topicIds = mutable.Map.empty[String, Uuid] + topicIds.addAll(metadataSnapshot.topicIds) + topicIds.addAll(newTopicIds) Review comment: Thank you for your suggestions, I now understand the solution. I remove the topicId in `removePartitionInfo`. ---------------------------------------------------------------- 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