You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "CrazyHZM (GitHub)" <gi...@apache.org> on 2018/11/26 14:55:26 UTC

[GitHub] [incubator-dubbo] CrazyHZM opened pull request #2832: optimization of duplicate code

## What is the purpose of the change
Optimize the duplicate code of FailbackRegistry.java.
## Brief changelog

XXXXX

## Verifying this change

XXXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

- [x] Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [ ] Format the pull request title like `[Dubbo-XXX] Fix UnknownException when host config not exist #XXX`. Each commit in the pull request should have a meaningful subject line and body.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test).
- [ ] Run `mvn clean install -DskipTests` & `mvn clean test-compile failsafe:integration-test` to make sure unit-test and integration-test pass.
- [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2832 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] codecov-io commented on issue #2832: optimization of duplicate code

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=h1) Report
> Merging [#2832](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=desc) into [2.6.x](https://codecov.io/gh/apache/incubator-dubbo/commit/483cd7c45f8759f18d9e712300bbb8af3eb69cb9?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=tree)

```diff
@@             Coverage Diff              @@
##              2.6.x    #2832      +/-   ##
============================================
+ Coverage     47.42%   47.44%   +0.01%     
+ Complexity     4294     4292       -2     
============================================
  Files           552      552              
  Lines         24381    24381              
  Branches       4314     4314              
============================================
+ Hits          11563    11567       +4     
+ Misses        11035    11029       -6     
- Partials       1783     1785       +2
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...om/alibaba/dubbo/rpc/filter/ActiveLimitFilter.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9ycGMvZmlsdGVyL0FjdGl2ZUxpbWl0RmlsdGVyLmphdmE=) | `83.33% <0%> (-5.56%)` | `6% <0%> (-1%)` | |
| [...rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1kdWJiby9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JwYy9wcm90b2NvbC9kdWJiby90ZWxuZXQvSW52b2tlVGVsbmV0SGFuZGxlci5qYXZh) | `54.21% <0%> (-3.62%)` | `13% <0%> (-2%)` | |
| [...baba/dubbo/remoting/transport/mina/MinaClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbWluYS9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9taW5hL01pbmFDbGllbnQuamF2YQ==) | `57.81% <0%> (-1.57%)` | `8% <0%> (-1%)` | |
| [...onfig/spring/extension/SpringExtensionFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9jb25maWcvc3ByaW5nL2V4dGVuc2lvbi9TcHJpbmdFeHRlbnNpb25GYWN0b3J5LmphdmE=) | `83.78% <0%> (+8.1%)` | `9% <0%> (ø)` | :arrow_down: |
| [...a/dubbo/remoting/transport/netty/NettyChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlDaGFubmVsLmphdmE=) | `66.25% <0%> (+8.75%)` | `21% <0%> (+2%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=footer). Last update [483cd7c...98e3628](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2832 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] CrazyHZM commented on issue #2832: optimization of duplicate code

Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
> first
Hard work,thanks.


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2832 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #2832: optimization of duplicate code

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
The code for this part has been completely reconfigured in another [PR](https://github.com/apache/incubator-dubbo/pull/2763). 
If we don't accept that pr, I will handle this pr. Let it stay open first.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2832 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] CrazyHZM closed pull request #2832: optimization of duplicate code

Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
[ pull request closed by CrazyHZM ]

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2832 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] CrazyHZM commented on issue #2832: optimization of duplicate code

Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
Sorry, I accidentally mishandled.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2832 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #2832: optimization of duplicate code

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
noting changed ?

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2832 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] codecov-io commented on issue #2832: optimization of duplicate code

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=h1) Report
> Merging [#2832](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=desc) into [2.6.x](https://codecov.io/gh/apache/incubator-dubbo/commit/483cd7c45f8759f18d9e712300bbb8af3eb69cb9?src=pr&el=desc) will **decrease** coverage by `0.03%`.
> The diff coverage is `84.61%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=tree)

```diff
@@             Coverage Diff              @@
##              2.6.x    #2832      +/-   ##
============================================
- Coverage     47.42%   47.38%   -0.04%     
+ Complexity     4294     4291       -3     
============================================
  Files           552      552              
  Lines         24381    24376       -5     
  Branches       4314     4310       -4     
============================================
- Hits          11563    11551      -12     
- Misses        11035    11045      +10     
+ Partials       1783     1780       -3
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...ibaba/dubbo/registry/support/FailbackRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vcmVnaXN0cnkvc3VwcG9ydC9GYWlsYmFja1JlZ2lzdHJ5LmphdmE=) | `55.02% <84.61%> (-0.1%)` | `32 <4> (-1)` | |
| [...aba/dubbo/remoting/transport/mina/MinaChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbWluYS9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9taW5hL01pbmFDaGFubmVsLmphdmE=) | `42.25% <0%> (-11.27%)` | `15% <0%> (-1%)` | |
| [...ba/dubbo/remoting/transport/netty/NettyClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlDbGllbnQuamF2YQ==) | `74.13% <0%> (-8.63%)` | `12% <0%> (-1%)` | |
| [...rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1kdWJiby9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JwYy9wcm90b2NvbC9kdWJiby90ZWxuZXQvSW52b2tlVGVsbmV0SGFuZGxlci5qYXZh) | `54.21% <0%> (-3.62%)` | `13% <0%> (-2%)` | |
| [...bo/remoting/transport/netty/NettyCodecAdapter.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlDb2RlY0FkYXB0ZXIuamF2YQ==) | `53.12% <0%> (-1.57%)` | `3% <0%> (ø)` | |
| [...onfig/spring/extension/SpringExtensionFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9jb25maWcvc3ByaW5nL2V4dGVuc2lvbi9TcHJpbmdFeHRlbnNpb25GYWN0b3J5LmphdmE=) | `78.37% <0%> (+2.7%)` | `9% <0%> (ø)` | :arrow_down: |
| [...a/dubbo/remoting/transport/netty/NettyChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2832/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlDaGFubmVsLmphdmE=) | `66.25% <0%> (+8.75%)` | `21% <0%> (+2%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=footer). Last update [483cd7c...27db055](https://codecov.io/gh/apache/incubator-dubbo/pull/2832?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2832 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org