Lin1997 opened a new pull request #7229:
URL: https://github.com/apache/skywalking/pull/7229
### Fix <bug description or the bug issue number or bug issue link>
- [ ] Add a unit test to verify that the fix works.
- [x] Explain briefly why the bug exists and how to fix it.
The `ExchangeFunctions$DefaultExchangeFunction` is stateless and
thread-safe, whose `exchange` may be called in different thread concurrently.
However, the `spring-webflux-5.x-webclient-plugin` use
`setSkyWalkingDynamicField` to pass the span in `WebFluxWebClientInterceptor`,
which broke the stateless design. Thus when the Webclient request concurrently,
the execution times of `prepareForAsync` and `asyncFinish()` may mismatch.
Use `ThreadLocal` to pass the span can fix this bug easily.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]