chickenlj commented on code in PR #2601:
URL: https://github.com/apache/dubbo-go/pull/2601#discussion_r1512308951
##########
cluster/cluster/failover/cluster_invoker.go:
##########
@@ -104,17 +105,25 @@ func (invoker *failoverClusterInvoker) Invoke(ctx
context.Context, invocation pr
}
}
-func getRetries(invokers []protocol.Invoker, methodName string) int {
+func getRetries(invokers []protocol.Invoker, invocation protocol.Invocation,
methodName string) int {
if len(invokers) <= 0 {
return constant.DefaultRetriesInt
}
url := invokers[0].GetURL()
-
- retries := url.GetMethodParamIntValue(methodName, constant.RetriesKey,
+ clientRetries := url.GetMethodParamIntValue(methodName,
constant.RetriesKey,
url.GetParamByIntValue(constant.RetriesKey,
constant.DefaultRetriesInt))
+ retries := clientRetries
+ // Get CallOpt first
+ if callRetries, ok := invocation.GetAttachment(constant.RetriesKey); ok
{
Review Comment:
Should we check `callRetries` like what you do in failback `ok && retries !=
"" {`?
--
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]