1kasa commented on code in PR #2909:
URL: https://github.com/apache/dubbo-go/pull/2909#discussion_r2121329568
##########
protocol/dubbo3/dubbo3_invoker.go:
##########
@@ -68,13 +69,32 @@ type DubboInvoker struct {
// NewDubboInvoker constructor
func NewDubboInvoker(url *common.URL) (*DubboInvoker, error) {
+ //TODO: Temporary compatibility with old APIs, can be removed later
Review Comment:
done
##########
protocol/dubbo3/dubbo3_invoker.go:
##########
@@ -68,13 +69,32 @@ type DubboInvoker struct {
// NewDubboInvoker constructor
func NewDubboInvoker(url *common.URL) (*DubboInvoker, error) {
+ //TODO: Temporary compatibility with old APIs, can be removed later
rt := config.GetConsumerConfig().RequestTimeout
+ if rt == "" {
+ if consumerConfRaw, ok :=
url.GetAttribute(constant.ConsumerConfigKey); ok {
+ if consumerConf, ok :=
consumerConfRaw.(*global.ConsumerConfig); ok {
+ rt = consumerConf.RequestTimeout
+ } else {
+ rt = constant.DefaultRequestTimeoutStr
+ logger.Warnf("DUBBO Client initialized the
consumer configuration failed")
+ }
+ }
+ }
+
+ // TODO: If you do not need to be compatible with the old API, you can
directly use url.GetAttribute(constant.ConsumerConfigKey) as the timeout
timeout := url.GetParamDuration(constant.TimeoutKey, rt)
// for triple pb serialization. The bean name from provider is the
provider reference key,
- // which can't locate the target consumer stub, so we use interface
key..
+ // which can't locate the target consumer stub, so we use interface key.
interfaceKey := url.GetParam(constant.InterfaceKey, "")
+ //TODO: Temporary compatibility with old APIs, can be removed later
consumerService :=
config.GetConsumerServiceByInterfaceName(interfaceKey)
Review Comment:
done
--
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]