fix Context loss when async invoke issue#13666#15192
fix Context loss when async invoke issue#13666#15192MaxChen1123 wants to merge 4 commits intoapache:3.3from
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 3.3 #15192 +/- ##
============================================
+ Coverage 60.78% 60.79% +0.01%
- Complexity 10890 10894 +4
============================================
Files 1885 1885
Lines 86072 86077 +5
Branches 12892 12891 -1
============================================
+ Hits 52319 52334 +15
+ Misses 28306 28296 -10
Partials 5447 5447
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Please write some tests to verify the current changes. |
|
@EarthChen PTAL |
| // this is to fix https://github.com/apache/dubbo/issues/13666 | ||
| this.responseFuture = this.responseFuture.thenApply((appResponse) -> { | ||
| RestoreContext tempStoredContext = RpcContext.clearAndStoreContext(); | ||
| this.storedContext.restore(); |
There was a problem hiding this comment.
Restore here might impact performance
There was a problem hiding this comment.
Should we just get the serverResponseLocal in storedContext directly? Or maybe we can have a flag in the RpcContext, once the user pass context into a thread, they should manually set this flag to true, then we will check the flag to decide whether add this thenApply or not. I'm not sure which one is better. @AlbumenJ
What is the purpose of the change?
to fix issue #13666 in Dubbo Protocol (still has this issue in Triple)
How
Checklist