You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "boomblog (GitHub)" <gi...@apache.org> on 2019/01/21 08:23:53 UTC
[GitHub] [incubator-dubbo] boomblog opened pull request #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
## What is the purpose of the change
在使用redis做为注册中心时,发现服务不能引用
## Brief changelog
CollectionUtils.isEmptyMap(values)改为if (!CollectionUtils.isEmptyMap(values))
## 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=false` & `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/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] khanimteyaz commented on pull request #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
@boomblog no worries I will add that on behalf of you 😃 and will guide you on this . As a practice we follow to add UT if there is conditional changes.
FYI I have created an [issue ](https://github.com/apache/incubator-dubbo/issues/3312) for the same.
Thanks for raising this PR and the contribution. Welcome.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] khanimteyaz commented on pull request #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
Thanks for this PR. Could you add a UT for this?
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] beiwei30 commented on issue #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
let's merge it.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] beiwei30 closed pull request #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
[ pull request closed by beiwei30 ]
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] CrazyHZM commented on pull request #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
@boomblog This suggestion is good, please modify it.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] khanimteyaz commented on pull request #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
@boomblog no worries I will add that on behalf of you 😃 . As a practice we follow to add UT if there is conditional changes. Do us a favour create an issue with information like UT and provide a reference of this PR.
Thanks for raising this PR and the contribution. Welcome.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] codecov-io commented on issue #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3291?src=pr&el=h1) Report
> Merging [#3291](https://codecov.io/gh/apache/incubator-dubbo/pull/3291?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/0a2b9bfe7c390529f3f39228879ac848e154e813?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `0%`.
[](https://codecov.io/gh/apache/incubator-dubbo/pull/3291?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #3291 +/- ##
=========================================
Coverage 63.93% 63.93%
Complexity 75 75
=========================================
Files 654 654
Lines 28236 28236
Branches 4780 4780
=========================================
Hits 18052 18052
+ Misses 7991 7989 -2
- Partials 2193 2195 +2
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3291?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...org/apache/dubbo/registry/redis/RedisRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktcmVkaXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlZ2lzdHJ5L3JlZGlzL1JlZGlzUmVnaXN0cnkuamF2YQ==) | `33.05% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...ache/dubbo/remoting/transport/AbstractChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RDaGFubmVsLmphdmE=) | `75% <0%> (-12.5%)` | `0% <0%> (ø)` | |
| [...onfig/spring/extension/SpringExtensionFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvZXh0ZW5zaW9uL1NwcmluZ0V4dGVuc2lvbkZhY3RvcnkuamF2YQ==) | `78.04% <0%> (-7.32%)` | `0% <0%> (ø)` | |
| [.../src/main/java/org/apache/dubbo/rpc/RpcStatus.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9ScGNTdGF0dXMuamF2YQ==) | `68.13% <0%> (-2.2%)` | `0% <0%> (ø)` | |
| [...rg/apache/dubbo/common/timer/HashedWheelTimer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdGltZXIvSGFzaGVkV2hlZWxUaW1lci5qYXZh) | `60.62% <0%> (-1.75%)` | `0% <0%> (ø)` | |
| [...he/dubbo/registry/multicast/MulticastRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktbXVsdGljYXN0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9tdWx0aWNhc3QvTXVsdGljYXN0UmVnaXN0cnkuamF2YQ==) | `64.93% <0%> (-1.74%)` | `0% <0%> (ø)` | |
| [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `80% <0%> (-0.39%)` | `0% <0%> (ø)` | |
| [...dubbo/remoting/exchange/support/DefaultFuture.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L0RlZmF1bHRGdXR1cmUuamF2YQ==) | `72.97% <0%> (ø)` | `0% <0%> (ø)` | :arrow_down: |
| [.../java/org/apache/dubbo/config/ReferenceConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9SZWZlcmVuY2VDb25maWcuamF2YQ==) | `60% <0%> (+0.37%)` | `0% <0%> (ø)` | :arrow_down: |
| [...apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1kdWJiby9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL3Byb3RvY29sL2R1YmJvL0R1YmJvUHJvdG9jb2wuamF2YQ==) | `66.66% <0%> (+0.83%)` | `0% <0%> (ø)` | :arrow_down: |
| ... and [5 more](https://codecov.io/gh/apache/incubator-dubbo/pull/3291/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3291?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/3291?src=pr&el=footer). Last update [0a2b9bf...f781f5d](https://codecov.io/gh/apache/incubator-dubbo/pull/3291?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/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] khanimteyaz commented on pull request #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
@boomblog no worries I will add that on behalf of you 😃 . As a practice we follow to add UT if there is conditional changes.
Thanks for raising this PR and the contribution. Welcome.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] boomblog commented on pull request #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "boomblog (GitHub)" <gi...@apache.org>.
Is it necessary? This is my first PR,I don't know much about。
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] beiwei30 commented on issue #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
let's merge it, and follow up to enhance.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] satansk commented on pull request #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "satansk (GitHub)" <gi...@apache.org>.
`CollectionUtils.isNotEmptyMap(values)` seems better to me :)
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] CrazyHZM commented on issue #3291: 应该是非空才循环,不然会导致在使用redis注册中心时消费者引用不到服务
Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
Looks good to me.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3291 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org