-
Notifications
You must be signed in to change notification settings - Fork 574
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
Fix the bug that maybe causing memory leak and repeated traceId when use gateway-2.1.x-plugin #133
Conversation
Thanks for reporting and sharing the context. Could you do the following to make this PR ready?
One question, when does RPC happens, after 1st or 2nd time |
|
2.0-plugin can not cause this bug. |
Thanks for the feedback. Please fix them as well, thanks. |
RPC happens after 1st time |
About (2), I mean SkyWalking GitHub issues list. |
It looks like you missed the UT. |
This plans to fix apache/skywalking#7923 apache/skywalking#7922 apache/skywalking#7658 @lkxiaolou I mean this ☝️ |
...org/apache/skywalking/apm/plugin/spring/cloud/gateway/v3x/NettyRoutingFilterInterceptor.java
Outdated
Show resolved
Hide resolved
...org/apache/skywalking/apm/plugin/spring/cloud/gateway/v3x/NettyRoutingFilterInterceptor.java
Outdated
Show resolved
Hide resolved
…spring-cloud/gateway-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v3x/NettyRoutingFilterInterceptor.java Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
You can't just apply my changes, this is a change tip, but I didn't change all relative codes. |
ok, i will finish other relative codes. |
Have you fixed the broken UT? |
fixed |
Your UTs are still failing, please run and make it passed locally first. https://github.com/apache/skywalking-java/runs/5754418883?check_suite_focus=true |
Seems to miss me 😀 |
|
"The custom filter causing NettyRoutingFilterInterceptor.beforeMethod called twice". I think this problem is caused by the incorrect use of filter syntax.
I think it could be "return Mono.empty();"
|
Fix the bug that maybe causing memory leak and repeated traceId when use gateway-2.1.x-plugin
use custom filter like this in spring cloud gateway 2.2.3.RELEASE, cause the bug.
because the custom filter causing NettyRoutingFilterInterceptor.beforeMethod called twice, but HttpClientFinalizerSendInterceptor.beforeMethod just called once in request. So TracingContext.activeSpanStack size not be zero when request trace end.
Fix it: do nothing when second call NettyRoutingFilterInterceptor.beforeMethod:
CHANGES
log.