Skip to content

Fix Invocation attributes#4024

Merged
chickenlj merged 1 commit intoapache:3.x-devfrom
qinliujie:bugfix/invocation-fix
May 10, 2019
Merged

Fix Invocation attributes#4024
chickenlj merged 1 commit intoapache:3.x-devfrom
qinliujie:bugfix/invocation-fix

Conversation

@qinliujie
Copy link
Copy Markdown
Contributor

What is the purpose of the change

fix RpcInvocation can't pass attributes

Brief changelog

change RpcInvocation and GenericFilter

Copy link
Copy Markdown
Contributor

@Jeff-Lv Jeff-Lv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look good to me

Copy link
Copy Markdown
Contributor

@chickenlj chickenlj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

public RpcInvocation(Method method, Object[] arguments, Map<String, String> attachment, Map<Object, Object> attributes) {
this(method.getName(), method.getParameterTypes(), arguments, attachment, null);
this.returnType = method.getReturnType();
this.attributes = attributes == null ? new HashMap<>() : attributes;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if attributes will be passed downstream by the framework automatically.

I remember RpcInvocation is not encoded as a whole:
https://github.com/apache/incubator-dubbo/blob/ebe3e424579d5986bf4cbb518ca6a4ff28f9a257/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java#L187

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.

3 participants