joeCarf commented on code in PR #7510:
URL: https://github.com/apache/rocketmq/pull/7510#discussion_r1375154890


##########
client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:
##########
@@ -785,6 +793,7 @@ public boolean updateTopicRouteInfoFromNameServer(final 
String topic, boolean is
                     if (!topic.startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX) && 
!topic.equals(TopicValidator.AUTO_CREATE_TOPIC_KEY_TOPIC)) {
                         log.warn("updateTopicRouteInfoFromNameServer 
Exception", e);
                     }
+                    throw e;

Review Comment:
   先log再throw的写法可能会造成上层出现重复打印error的情况



##########
client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:
##########
@@ -785,6 +793,7 @@ public boolean updateTopicRouteInfoFromNameServer(final 
String topic, boolean is
                     if (!topic.startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX) && 
!topic.equals(TopicValidator.AUTO_CREATE_TOPIC_KEY_TOPIC)) {
                         log.warn("updateTopicRouteInfoFromNameServer 
Exception", e);
                     }
+                    throw e;

Review Comment:
   先log再throw的写法可能会造成上层出现重复打印error的情况



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

Reply via email to