mumrah commented on code in PR #14545:
URL: https://github.com/apache/kafka/pull/14545#discussion_r1366294162


##########
metadata/src/main/java/org/apache/kafka/metadata/migration/KRaftMigrationZkWriter.java:
##########
@@ -146,6 +147,15 @@ void handleTopicsSnapshot(TopicsImage topicsImage, 
KRaftMigrationOperationConsum
         Map<Uuid, Map<Integer, PartitionRegistration>> changedPartitions = new 
HashMap<>();
         Map<Uuid, Map<Integer, PartitionRegistration>> newPartitions = new 
HashMap<>();
 
+        Set<String> pendingTopicDeletions = 
migrationClient.topicClient().readPendingTopicDeletions();
+        if (!pendingTopicDeletions.isEmpty()) {
+            operationConsumer.accept(
+                DELETE_PENDING_TOPIC_DELETION,
+                "Delete pending topic deletions",
+                migrationState -> 
migrationClient.topicClient().clearPendingTopicDeletions(pendingTopicDeletions, 
migrationState)

Review Comment:
   Yea, this is in `handleTopicsSnapshot` which is sync'ing the TopicImage to 
ZK. Really it doesn't need to happen each time when we handle a snapshot, but I 
figured putting it here was better than having additional one-off logic at 
migration time 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to