[ https://issues.apache.org/jira/browse/KAFKA-16892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17852339#comment-17852339 ]
Luke Chen commented on KAFKA-16892: ----------------------------------- [~robinhan] , thanks for reporting it. Could I know what impact is for this issue? Partition cannot get deleted? > TopicsDelta#localChanges get empty deletes when load from snapshot > ------------------------------------------------------------------ > > Key: KAFKA-16892 > URL: https://issues.apache.org/jira/browse/KAFKA-16892 > Project: Kafka > Issue Type: Bug > Components: kraft > Affects Versions: 3.4.0, 3.5.0, 3.6.0, 3.7.0 > Reporter: HanXu > Assignee: HanXu > Priority: Minor > > MetadataLoader#loadSnapshot get empty > TopicsDelta.localChanges(brokerId).deletes > Bug: > 1. When generating MetadataDelta from Snapshot, TopicsDelta will first > #replay(TopicRecord); > 2. However, TopicsDelta directly creates a TopicDelta without any Partitions, > instead of using the previous TopicImage; > 3. Because TopicDelta.image has no Partitions, when TopicDelta#localChanges > generates the deletes list, it returns empty deletes. > https://github.com/apache/kafka/blob/02c794dfd3bda12066031155bd62234ad863860b/metadata/src/main/java/org/apache/kafka/image/TopicsDelta.java#L71C1-L76C6 > https://github.com/apache/kafka/blob/02c794dfd3bda12066031155bd62234ad863860b/metadata/src/main/java/org/apache/kafka/image/TopicDelta.java#L142-L148 -- This message was sent by Atlassian Jira (v8.20.10#820010)