Skip to content
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

Prevent the RpcClient cleanup thread from cleaning up the client object that is about to be used #78

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

eric-zc1
Copy link
Contributor

  1. RpcClientProxy的lastUsedNanos使volatile,避免多线程可见性不一致;
  2. 使用ConcurrentMap的compute,在返回之前updateLastUsedNanos,保证其他线程get的时候拿到的是都是已经更新过最后使用时间的

2. 使用ConcurrentMap的compute,在返回之前updateLastUsedNanos,保证其他线程get的时候拿到的是都是已经更新过最后使用时间的
@eric-zc1
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.11985%. Comparing base (d5ad43f) to head (473a7bc).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@                  Coverage Diff                  @@
##                master         #78         +/-   ##
=====================================================
- Coverage     70.14323%   70.11985%   -0.02339%     
+ Complexity        4241        4239          -2     
=====================================================
  Files              437         437                 
  Lines            17105       17105                 
  Branches          1727        1727                 
=====================================================
- Hits             11998       11994          -4     
- Misses            3992        3995          +3     
- Partials          1115        1116          +1     
Files with missing lines Coverage Δ
...ent/trpc/core/cluster/RpcClusterClientManager.java 53.27869% <100.00000%> (ø)

... and 2 files with indirect coverage changes

@wardseptember wardseptember merged commit e7eccb0 into trpc-group:master Jan 15, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants