xdkxlk commented on code in PR #7209: URL: https://github.com/apache/rocketmq/pull/7209#discussion_r1301252174
########## broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java: ########## @@ -542,16 +543,28 @@ private synchronized RemotingCommand deleteTopic(ChannelHandlerContext ctx, } } - this.brokerController.getTopicConfigManager().deleteTopicConfig(requestHeader.getTopic()); - this.brokerController.getTopicQueueMappingManager().delete(requestHeader.getTopic()); - this.brokerController.getConsumerOffsetManager().cleanOffsetByTopic(requestHeader.getTopic()); - this.brokerController.getPopInflightMessageCounter().clearInFlightMessageNumByTopicName(requestHeader.getTopic()); - this.brokerController.getMessageStore().deleteTopics(Sets.newHashSet(requestHeader.getTopic())); + final Set<String> groups = this.brokerController.getConsumerOffsetManager().whichGroupByTopic(topic); + // delete pop retry topics first Review Comment: Because we already have the groups, I feel that it is better to check directly whether the pop retry topic exists in the TopicConfigManager, like ```java for (String group : groups) { String popRetryTopic = KeyBuilder.buildPopRetryTopic(topic, group); if (brokerController.getTopicConfigManager().selectTopicConfig(popRetryTopic) != null) { deleteTopicInBroker(popRetryTopic); } } ``` -- 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: commits-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org