Replies: 2 comments
-
SkyWalking community usually only hosts plugins, as maintainers can't keep eyes on so many ones. If you want to fix and can explain what caused this, we could help. Otherwise, we have to wait for any volunteer further. |
Beta Was this translation helpful? Give feedback.
-
If something reuses the dispatch thread, maybe we need to follow the context switch and make sure context changed accordingly. |
Beta Was this translation helpful? Give feedback.
-
Search before asking
Apache SkyWalking Component
Java Agent (apache/skywalking-java)
What happened
I am sure it should only contains one http request (the first one) in this segment.
I check the httpasyncclient-4.x-plugin. I think it just get the skywalking context capture from http connection and start the span when I/O dispatcher ready to start the request. Keep the skywalking context thread local and end it when consume response.
But before the previous request has finished, some other requests could reuse this same I/O dispatcher and create their span in wrong context. I guess this is the reason why they have wrong tid and this segment has some unexpected spans.
What you expected to happen
Request have right trace id.
How to reproduce
Errors can occur with high concurrency. For us, it's about 200 QPS and 10 IO thread count. Set IO thread count to 1 could make it easier to reproduce it.
Anything else
The skywalking-java version is 9.0.0.
Are you willing to submit a pull request to fix on your own?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions