- [*] I have searched the issues of this repository and believe that this is not a duplicate.
- [*] I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
- Dubbo version: 2.6.3
- Operating System version: macos
- Java version: 1.8.0
Steps to reproduce this issue
dubbo2.6.3 服务提供者中使用泛化调用时,绑定attachments时interface错误
dubbo服务提供者中使用泛化调用时,绑定attachments时interface错误,导致thrift encode失败:Could not encode request, the specified interface may be incorrect.
- 调用方调用 interfaceA.methodA方法
- methodA中通过泛化调用interfaceB.methodB方法
- attachements中的interface参数为interfaceA,而不是interfaceB
问题出现在AbstractClusterInvoker中的233行:
`
// binding attachments into invocation.
Map<String, String> contextAttachments = RpcContext.getContext().getAttachments();
if (contextAttachments != null && contextAttachments.size() != 0) {
((RpcInvocation) invocation).addAttachments(contextAttachments);
}
`