<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<p dir="auto">I have a following question:</p>
<p dir="auto">Should a service using injvm protocol register to a registry ?</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.4.1</li>
<li>Operating System version: mac</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>
<p dir="auto">invocation.setAttachment  can't affect  in filter if RPCContext has same Key</p>
</li>
<li>
<p dir="auto">a服务在filter中通过invocation设定a服务的kv对app=a，向b调用后，b向c发起调用，同时经过一致的filter设置b服务的kv对app=b，然后c服务接收。但是c无论从RPCContext还是invocation中，拿到的都是app=a的kv对</p>
</li>
<li>
<p dir="auto">本质是因为AbstractInvoker中构建处理，总是RPCContext的优先级总是高于Invocation<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12370508/77324025-1e848000-6d51-11ea-8447-5919c0dbc585.png"><img src="https://user-images.githubusercontent.com/12370508/77324025-1e848000-6d51-11ea-8447-5919c0dbc585.png" alt="image" style="max-width: 100%;"></a></p>
</li>
<li>
<p dir="auto">看起来这和规范相关，曾经的历史显示是有key不添加，现在的则是完全的覆盖。我想确定的是这是一个规范么，在filter中，不要使用invocation去设置，而是通过RpcContext来设定</p>
</li>
<li>
<p dir="auto">注解来看，其只是为了自己的编程范式下，对结果的修正，并没有讨论这种修正会对invocation造成的潜在的影响</p>
</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">c希望接收到由b服务的kv对app=b</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">c收到了上上游服务传递下来的kv对app=a</p>