sofastack / sofa-rpc

SOFARPC is a high-performance, high-extensibility, production-level Java RPC framework.
https://www.sofastack.tech/sofa-rpc/docs/Home
Apache License 2.0
3.81k stars 1.17k forks source link

Fix/concurrency problem in deque local #1203

Closed EvenLjj closed 2 years ago

EvenLjj commented 2 years ago

Motivation:

DEQUE_LOCAL in RpcInternalContext only be responsible for holder B context in A->B->C, so it no need to clone from parent thread.

Modification:

DEQUE_LOCAL replace to ThreadLocal.

Result:

Fixes #.

If there is no issue then describe the changes introduced by this PR.

codecov[bot] commented 2 years ago

Codecov Report

Merging #1203 (7eb9011) into master (d107d22) will increase coverage by 0.09%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1203      +/-   ##
============================================
+ Coverage     71.53%   71.63%   +0.09%     
  Complexity      830      830              
============================================
  Files           408      408              
  Lines         17224    17224              
  Branches       2684     2684              
============================================
+ Hits          12322    12339      +17     
+ Misses         3535     3521      -14     
+ Partials       1367     1364       -3     
Impacted Files Coverage Δ
...om/alipay/sofa/rpc/context/RpcInternalContext.java 82.88% <100.00%> (ø)
...ipay/sofa/rpc/tracer/sofatracer/RpcSofaTracer.java 91.06% <0.00%> (+0.74%) :arrow_up:
...n/java/com/alipay/sofa/rpc/common/SofaConfigs.java 86.79% <0.00%> (+1.88%) :arrow_up:
...a/com/alipay/sofa/rpc/common/utils/ClassUtils.java 80.27% <0.00%> (+2.04%) :arrow_up:
...ansport/bolt/ReuseBoltClientConnectionManager.java 68.11% <0.00%> (+2.89%) :arrow_up:
...n/java/com/alipay/sofa/rpc/log/TimeWaitLogger.java 84.00% <0.00%> (+4.00%) :arrow_up:
...ipay/sofa/rpc/server/bolt/BoltServerProcessor.java 69.59% <0.00%> (+4.72%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d107d22...7eb9011. Read the comment docs.