Snow-kal commented on code in PR #3231:
URL: https://github.com/apache/dubbo-go/pull/3231#discussion_r2893943234
##########
protocol/dubbo3/dubbo3_protocol.go:
##########
@@ -86,11 +83,13 @@ func (dp *DubboProtocol) Export(invoker base.Invoker)
base.Exporter {
key := url.GetParam(constant.BeanNameKey, "")
var service any
- //TODO: Temporary compatibility with old APIs, can be removed later
- service = config.GetProviderService(key)
if rpcService, ok := url.GetAttribute(constant.RpcServiceKey); ok {
service = rpcService
}
+ if service == nil {
+ logger.Errorf("no rpc service found in url attribute %s for
service key: %s", constant.RpcServiceKey, key)
+ return nil
+ }
Review Comment:
已更改:
现在先完成 service 和序列化校验,全部通过后才 SetExporterMap。
效果:失败时不再污染 ExporterMap
--
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]