victorqian opened a new issue, #12265:
URL: https://github.com/apache/dubbo/issues/12265
依赖:
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>3.2.0</version>
</dependency>
Provider端使用3.0.10版本,并且服务暴露双协议: dubbo和tri协议
Consumer升级至3.2.0版本,进行调用时,报如下错误:
[2023-05-08 15:15:08,503] [WARN ]
[org.apache.dubbo.rpc.protocol.tri.stream.StreamUtils ?] [main] dstTraceId:[]
[DUBBO] Meet exception when convert single attachment key:version value=null,
dubbo version: 3.2.0, current host: 192.168.3.217, error code: 4-1. This may be
caused by , go to https://dubbo.apache.org/faq/4/1 to find instructions. []
java.lang.NullPointerException: null
at
org.apache.dubbo.rpc.protocol.tri.stream.StreamUtils.convertSingleAttachment(StreamUtils.java:137)
at
org.apache.dubbo.rpc.protocol.tri.stream.StreamUtils.convertAttachment(StreamUtils.java:107)
at
org.apache.dubbo.rpc.protocol.tri.RequestMetadata.toHeaders(RequestMetadata.java:74)
at
org.apache.dubbo.rpc.protocol.tri.call.TripleClientCall.sendMessage(TripleClientCall.java:173)
at
org.apache.dubbo.rpc.protocol.tri.observer.ClientCallToObserverAdapter.onNext(ClientCallToObserverAdapter.java:44)
at
org.apache.dubbo.rpc.protocol.tri.TripleInvoker.invokeUnary(TripleInvoker.java:247)
经过debug发现,ServiceDiscoveryRegistryDirectory中的invoke方法,在协议变更时,会往Attachment中设置group和version参数,如果这两个参数未使用,则会设置为null,最后导致空指针。

请问这是预期中的现象吗?
--
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]