AlbumenJ commented on code in PR #10456:
URL: https://github.com/apache/dubbo/pull/10456#discussion_r945256748
##########
dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java:
##########
@@ -97,7 +97,7 @@ public Result invoke(Invoker<?> invoker, Invocation inv)
throws RpcException {
String generic = inv.getAttachment(GENERIC_KEY);
if (StringUtils.isBlank(generic)) {
- generic =
RpcContext.getClientAttachment().getAttachment(GENERIC_KEY);
+ generic =
RpcContext.getServerAttachment().getAttachment(GENERIC_KEY);
}
Review Comment:
这段逻辑应该是为了适配之前 http/hessian 协议的实现的,由于老的实现是直接用的
RpcContext.getContext().setAttachment(GENERIC_KEY, xxx)
来配置的,所以这个修改后会影响正常使用。最好这里是能有一个 fallback 的逻辑,从 invocation => server attachment =>
client attachment。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]