-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #10148]Replace sync forward request with async request #10158
[issue #10148]Replace sync forward request with async request #10158
Conversation
@KomachiSion 请问为啥wontfix呢? |
@yuyijq 感谢贡献哈,这个点我们在issues里边再讨论一下,需要再考虑一下边界场景。 |
naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java
Outdated
Show resolved
Hide resolved
1. Move async forward switch from sys module to naming module. 2. use nacos code style to format code.
naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java
Outdated
Show resolved
Hide resolved
1. one import per Class 2. add javadoc
@KomachiSion 能再看看吗 |
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.
改动点应该只剩上面那个地方了。
完了麻烦加一下UT
naming/src/main/java/com/alibaba/nacos/naming/misc/GlobalConfig.java
Outdated
Show resolved
Hide resolved
…to ClientConfig and cache the env switch.
我看现在的UT可以覆盖这个改动把,我其实没有改变具体的行为 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #10158 +/- ##
=============================================
+ Coverage 51.86% 53.84% +1.97%
- Complexity 5098 5357 +259
=============================================
Files 875 879 +4
Lines 27791 27877 +86
Branches 3077 3086 +9
=============================================
+ Hits 14414 15010 +596
+ Misses 12043 11530 -513
- Partials 1334 1337 +3
... and 91 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
以前只有同步的方式,现在有加入了异步方式, 如果以前有测试,只是测试了同步的, 你需要加一定的UT来测试异步模式。 |
@yuyijq 麻烦加一下异步相关代码的ut |
@KomachiSion async 的ut加上了,这个DistroConfig的静态加载有点坑,搞了很久才发现是这个问题导致一直不走async forward,本地单跑一直没发现。 |
@KomachiSion 这个还有什么问题么? |
Sorry, I make a mistake, I found add new dependency
|
Why add these new dependencies? |
For fix issue #10148.
Use async request in DistroFilter other than sync request.