xdkxlk commented on code in PR #7209:
URL: https://github.com/apache/rocketmq/pull/7209#discussion_r1298108056


##########
common/src/main/java/org/apache/rocketmq/common/KeyBuilder.java:
##########
@@ -31,6 +31,13 @@ public static String parseNormalTopic(String topic, String 
cid) {
         }
     }
 
+    public static boolean isPopRetryTopicOfTopic(String retryTopic, String 
topic) {
+        if (!retryTopic.startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX)) {
+            return false;
+        }
+        return retryTopic.endsWith("_" + topic);

Review Comment:
   If there is a group called GroupA subscribe a topic called TopicA, there 
will have a pop retry topic called %RETRY%GroupA_TopicA.
   But If there is another group called GroupB subscribe a topic called 
Another_TopicA, there will have a pop retry topic called 
%RETRY%GroupB_Another_TopicA.
   Therefore, when deleting TopicA, other pop retry topic will be deleted by 
mistake.



-- 
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