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.82k stars 1.17k forks source link

fix multiple subscribe error #1179

Closed ZLBer closed 2 years ago

ZLBer commented 2 years ago

Bugfix:

Using method computeIfAbsent avoid creating multiple informers and some Listeners failure due to multiple subscribe.

codecov[bot] commented 2 years ago

Codecov Report

Merging #1179 (006d38c) into master (1e7cd58) will increase coverage by 0.06%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1179      +/-   ##
============================================
+ Coverage     71.12%   71.19%   +0.06%     
- Complexity      825      826       +1     
============================================
  Files           407      407              
  Lines         17199    17198       -1     
  Branches       2681     2680       -1     
============================================
+ Hits          12233    12244      +11     
+ Misses         3586     3579       -7     
+ Partials       1380     1375       -5     
Impacted Files Coverage Δ
...lipay/sofa/rpc/registry/consul/ConsulRegistry.java 47.51% <100.00%> (+0.26%) :arrow_up:
...om/alipay/sofa/rpc/server/triple/TripleServer.java 73.88% <0.00%> (-1.12%) :arrow_down:
...va/com/alipay/sofa/rpc/client/AbstractCluster.java 70.68% <0.00%> (+0.26%) :arrow_up:
...ipay/sofa/rpc/tracer/sofatracer/RpcSofaTracer.java 91.06% <0.00%> (+0.74%) :arrow_up:
...lipay/sofa/rpc/message/AbstractResponseFuture.java 57.89% <0.00%> (+1.75%) :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 76d26c5...006d38c. Read the comment docs.