Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix get wrong ProviderInfo when use reuses client transport. #102

Merged
merged 1 commit into from
May 9, 2018

Conversation

ujjboy
Copy link
Member

@ujjboy ujjboy commented May 9, 2018

Motivation:

When reuse client transport, the invoke event should not get consumer config and provider info from client transport self but from context.

Modification:

  • Add InterfaceConfig to RpcInternalContext
  • Use RpcInternalContext.getInterfaceConfig() instead of transport.getInterfaceConfig()
  • Use RpcInternalContext.getProviderInfo() instead of transport.getProviderInfo()
  • Add event to RestClientTransport

Result:

Fixes #99 in v5.4.x

@ujjboy ujjboy added the bug Something isn't working label May 9, 2018
@ujjboy ujjboy added this to the 5.4.0 milestone May 9, 2018
@codecov-io
Copy link

Codecov Report

Merging #102 into master will increase coverage by 0.07%.
The diff coverage is 77.5%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #102      +/-   ##
============================================
+ Coverage      63.9%   63.98%   +0.07%     
  Complexity      602      602              
============================================
  Files           265      265              
  Lines         11338    11357      +19     
  Branches       1899     1901       +2     
============================================
+ Hits           7246     7267      +21     
+ Misses         3118     3114       -4     
- Partials        974      976       +2
Impacted Files Coverage Δ Complexity Δ
...y/sofa/rpc/transport/rest/RestClientTransport.java 100% <ø> (+10%) 3 <0> (-1) ⬇️
...va/com/alipay/sofa/rpc/client/AbstractCluster.java 64.91% <100%> (+0.23%) 0 <0> (ø) ⬇️
...ipay/sofa/rpc/server/bolt/BoltServerProcessor.java 64.51% <100%> (+0.28%) 20 <0> (ø) ⬇️
...fa/rpc/transport/AbstractProxyClientTransport.java 59.75% <57.14%> (-0.81%) 0 <0> (ø)
...y/sofa/rpc/transport/bolt/BoltClientTransport.java 67.51% <85.71%> (-0.25%) 29 <2> (ø)
...om/alipay/sofa/rpc/context/RpcInternalContext.java 62.6% <87.5%> (+7.65%) 0 <0> (ø) ⬇️
...lipay/sofa/rpc/codec/antpb/ProtobufSerializer.java 53.84% <0%> (-2.2%) 17% <0%> (ø)
...n/java/com/alipay/sofa/rpc/common/SofaConfigs.java 83.92% <0%> (-1.79%) 0% <0%> (ø)
...ay/sofa/rpc/client/AllConnectConnectionHolder.java 53.35% <0%> (-0.56%) 0% <0%> (ø)
.../alipay/sofa/rpc/registry/local/LocalRegistry.java 57.83% <0%> (+0.6%) 26% <0%> (+1%) ⬆️
... and 3 more

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 855ef18...bfd9aa4. Read the comment docs.

@ujjboy ujjboy merged commit e5e6a67 into sofastack:master May 9, 2018
@ujjboy ujjboy deleted the fix_issue_99 branch May 9, 2018 16:52
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants