Fixed a bug where the provider did not correctly inject the token#5697
Merged
chickenlj merged 1 commit intoapache:masterfrom Jan 31, 2020
Merged
Fixed a bug where the provider did not correctly inject the token#5697chickenlj merged 1 commit intoapache:masterfrom
chickenlj merged 1 commit intoapache:masterfrom
Conversation
…UID into the registry when the token was set to true; added the missing dubbo-remoting-etcd3 and dubbo-registry-eureka modules in dubbo-all / pom.xml
Codecov Report
@@ Coverage Diff @@
## master #5697 +/- ##
============================================
- Coverage 61.34% 61.16% -0.19%
- Complexity 425 471 +46
============================================
Files 923 925 +2
Lines 37572 37781 +209
Branches 5442 5450 +8
============================================
+ Hits 23047 23107 +60
- Misses 12043 12172 +129
- Partials 2482 2502 +20
Continue to review full report at Codecov.
|
Contributor
|
LGTM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
我发现一个可能一直存在的问题,就是我们的token机制没有被正确使用,我之前使用的dubbo-2.5.3版本就有这个问题,最近我在使用dubbo-2.7.5版本时发现这个问题仍然存在。
I found a problem that may have existed all the time, that is, our token mechanism has not been used correctly. This problem existed in dubbo-2.5.3, which I used before. Recently, when I used dubbo-2.7.5, I found that this problem still exists.
现象:
当token设置成true时,provider没有将token的UUID正确注入到注册中心的bug,例如:
Phenomenon:
When the token is set to true, the provider does not correctly inject the UUID of the token into the bug in the registry, for example:
<dubbo:provider token="true" filter="SystemParamProviderFilter,DLProviderFilter,MetricsProviderFilter"/>我在provider端暴露了一个dubbo协议的接口:com.manzhizhen.dubbo.api.Dubbo1Service,结果我在注册中心上(zookeeper)看到的结果如下:
I exposed an interface of Dubbo protocol on the provider side: com.manzhen.dubbo.api.dubbo1service. As a result, the results I saw on the zookeeper are as follows:
注意,其中token=true,但其实应该是token=某个UUID,而不是true。
Note that token = true, but it should be token = a UUID instead of true.
下面是我修改代码后的效果:
Here is the effect after I modify the code:
这里显示了正确的效果,token=89b5748a-8016-454d-940c-89d53d78f104,一个UUID的值。
The correct effect is shown here, token = 89b5748a-8016-454d-940c-89d53d78f104, a UUID value.
这符合之前org.apache.dubbo.config.ServiceConfig中的代码逻辑:
This is in line with the previous code logic in org.apache.dubbo.config.Serviceconfig:
此次PR还修复了dubbo-all中缺失的两个模块依赖问题,所以我们在dubbo-all/pom.xml中添加了遗漏的dubbo-remoting-etcd3和dubbo-registry-eureka模块。
This PR also fixed two missing module dependencies in Dubbo all, so we added the missing Dubbo remoting etcd3 and Dubbo registry Eureka modules in Dubbo all / pom.xml.