Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Ignore deserilization when service/method not found #5733

Merged
merged 14 commits into from
May 1, 2020

Conversation

chickenlj
Copy link
Contributor

No description provided.

@chickenlj chickenlj added this to the 2.7.6 milestone Feb 11, 2020
@chickenlj
Copy link
Contributor Author

#5413

@chickenlj chickenlj modified the milestones: 2.7.6, 2.7.7 Mar 11, 2020
@chickenlj chickenlj self-assigned this Apr 3, 2020
@hengyunabc hengyunabc modified the milestones: 2.7.7, 2.7.8 Apr 27, 2020
# Conflicts:
#	dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocolTest.java
#	dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/MultiThreadTest.java
@chickenlj chickenlj merged commit 04fc3ce into apache:master May 1, 2020
@chickenlj chickenlj deleted the ignore-serialization branch May 1, 2020 07:45
@hengyunabc
Copy link
Contributor

这个commit会导致 dubbo-samples-group 失败,原因是 DecodeableRpcInvocation.java 里增加了一个判断。

  1. sample里定义了两个bean
    <dubbo:service group="groupA" interface="org.apache.dubbo.samples.group.api.GroupService" ref="groupAService"/>

    <dubbo:service group="groupB" interface="org.apache.dubbo.samples.group.api.GroupService" ref="groupBService"/>
  1. 在产生spring bean name时,为了避免冲突,第二个bean name会变为 org.apache.dubbo.samples.group.api.GroupService2

参考: org.apache.dubbo.config.spring.schema.DubboBeanDefinitionParser.parse(Element, ParserContext, Class<?>, boolean)

  1. dubbo里创建URL对象时,会取spring bean name来作为 url 里的path

org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ProtocolConfig, List)

所以注册到zk上的path就会有一个是这样子的: dubbo://127.0.0.1:20880/org.apache.dubbo.samples.group.api.GroupService2?interface=org.apache.dubbo.samples.group.api.GroupService

  1. client在从zk下取回url时,也会取到path是 org.apache.dubbo.samples.group.api.GroupService2 的url。

  2. 然后在这个commit新增加的校验里报错。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants