-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE #7509] Optimize updateTopicRouteInfoFromNameServer #7510
Conversation
* Throw MQClientException for updateTopicRouteInfoFromNameServer * Add compatible updateTopicRouteInfoFromNameServerWithoutException method
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
先log再throw的写法可能会造成上层出现重复打印error的情况
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是为了尽可能和之前的行为保持一致,如果去掉的话,可能会导致原先打印的日志无法被打印出来。
Codecov Report
@@ Coverage Diff @@
## develop #7510 +/- ##
==========================================
Coverage 43.01% 43.01%
+ Complexity 9685 9683 -2
==========================================
Files 1158 1158
Lines 83977 83981 +4
Branches 10915 10915
==========================================
+ Hits 36122 36124 +2
- Misses 43362 43363 +1
- Partials 4493 4494 +1
... and 19 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Which Issue(s) This PR Fixes
To throw the specific exception to the upper level with more information.
Fixes #7509
Brief Description
Throw MQClientException for updateTopicRouteInfoFromNameServer
Add compatible updateTopicRouteInfoFromNameServerWithoutException method
How Did You Test This Change?