Owen-CH-Leung commented on code in PR #14136: URL: https://github.com/apache/kafka/pull/14136#discussion_r1285865061
########## core/src/main/java/kafka/log/remote/RemoteLogManager.java: ########## @@ -347,15 +353,16 @@ public void onLeadershipChange(Set<Partition> partitionsBecomeLeader, public void stopPartitions(TopicPartition topicPartition, boolean delete) { if (delete) { // Delete from internal datastructures only if it is to be deleted. - Uuid topicIdPartition = topicPartitionIds.remove(topicPartition); - LOGGER.debug("Removed partition: {} from topicPartitionIds", topicIdPartition); + Map<String, Uuid> mapping = metaDataCache.topicNamesToIds(); + Uuid topicIdPartition = mapping.remove(topicPartition.topic()); Review Comment: Got it. So can I say for `stopPartition` and `onLeadershipChange`, there's no need to update the metadatacache at all ? Is there any extra logic that should be addded into these 2 APIs ? -- 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