You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "EndlessSeeker (via GitHub)" <gi...@apache.org> on 2024/02/28 09:59:00 UTC

[I] 客户端发起调用时配置重试次数时不生效 [dubbo-go]

EndlessSeeker opened a new issue, #2598:
URL: https://github.com/apache/dubbo-go/issues/2598

   ### Environment
   
   - Server: dubbo-go 3.2
   - Client: dubbo-go 3.2
   - Protocol: triple
   
   ### Issue description
   
   在尝试客户端调用服务端,服务端报错的case时,发现客户端会默认重试3次,但是我指定服务调用的重试次数为1时,仍然会进行3次调用,重试的配置没有生效
   ```go
   	resp, err = svc.Greet(context.Background(), &greet.GreetRequest{Name: "wrong name"}, client.WithCallRetries(1))
   	if err != nil {
   		logger.Errorf("call Greet failed, err: %s", err.Error())
   	}
   ```
   
   ### Logs
   client log
   ```
   2024-02-28 17:57:49	ERROR	logger/logging.go:52	call Greet failed, err: [Failed to invoke the method Greet in the service greet.GreetService. Tried 2 times of the providers [tri://:@127.0.0.1:20000/?interface=greet.GreetService&group=&version= tri://:@127.0.0.1:20000/?interface=greet.GreetService&group=&version= tri://:@127.0.0.1:20000/?interface=greet.GreetService&group=&version=] (3/1)from the registry tri://127.0.0.1:20000/greet.GreetService?app.version=&application=dubbo.io&async=false&bean.name=greet.GreetService&cluster=failover&config.tracing=&environment=&generic=&group=&interface=greet.GreetService&loadbalance=&metadata-type=local&module=sample&name=dubbo.io&organization=dubbo-go&owner=dubbo-go&peer=true&provided-by=&reference.filter=cshutdown&registry.role=0&release=dubbo-golang-3.2.0&remote.timestamp=&retries=&serialization=protobuf&side=consumer&sticky=false&timestamp=1709114268&version= on the consumer 30.221.146.234 using the dubbo version 3.2.0. Last error is unknown
 : name is not right: wrong name.: unknown: name is not right: wrong name]
   ```
   server log
   ```
   2024-02-28 17:57:49     ERROR   logger/logging.go:32    [name is not right: wrong name]
   2024-02-28 17:57:49     ERROR   logger/logging.go:32    [name is not right: wrong name]
   2024-02-28 17:57:49     ERROR   logger/logging.go:32    [name is not right: wrong name]
   
   ```


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] 客户端发起调用时配置重试次数时不生效 [dubbo-go]

Posted by "Phixsura (via GitHub)" <gi...@apache.org>.
Phixsura commented on issue #2598:
URL: https://github.com/apache/dubbo-go/issues/2598#issuecomment-1971642455

   [cluster/cluster/failover/cluster_invoker.go 107-120](https://github.com/apache/dubbo-go/blob/52c81032a6437c458b0d953596bd457a92b3d271/cluster/cluster/failover/cluster_invoker.go#L107C1-L120C2)
   默认走的是failover,可以看看这段代码,他实际上拿的是client上默认的retries,所以为重试2次
   
   https://github.com/apache/dubbo-go/blob/52c81032a6437c458b0d953596bd457a92b3d271/cluster/cluster/failback/cluster_invoker.go#L215-L217
   有意思的是,从源码可以看出WithCallRetries在failback策略是起作用的,反而WithClientRetries在failback不起作用
   
   那么如果WithCallRetries的初衷是希望让本次调用走指定的次数,那么这里存在着bug
   且如果WithCallRetries是默认让端上所有未定义的请求走指定次数,那这或许也存在bug,如果我理解没问题的话
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] 客户端发起调用时配置重试次数时不生效 [dubbo-go]

Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on issue #2598:
URL: https://github.com/apache/dubbo-go/issues/2598#issuecomment-2071368339

   is this issue resolved already?


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] 客户端发起调用时配置重试次数时不生效 [dubbo-go]

Posted by "FinalT (via GitHub)" <gi...@apache.org>.
FinalT closed issue #2598: 客户端发起调用时配置重试次数时不生效
URL: https://github.com/apache/dubbo-go/issues/2598


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] 客户端发起调用时配置重试次数时不生效 [dubbo-go]

Posted by "binksBrew (via GitHub)" <gi...@apache.org>.
binksBrew commented on issue #2598:
URL: https://github.com/apache/dubbo-go/issues/2598#issuecomment-2028537886

   resp, err := svc.Greet(context.Background(), &greet.GreetRequest{Name: "correct name"}, client.WithCallRetries(1))
   if err != nil {
       logger.Errorf("call Greet failed, err: %s", err.Error())
   }


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] 客户端发起调用时配置重试次数时不生效 [dubbo-go]

Posted by "chickenlj (via GitHub)" <gi...@apache.org>.
chickenlj commented on issue #2598:
URL: https://github.com/apache/dubbo-go/issues/2598#issuecomment-1978230534

   > 那么如果WithCallRetries的初衷是希望让本次调用走指定的次数,那么这里存在着bug
   > 且如果WithCallRetries是默认让端上所有未定义的请求走指定次数,那这或许也存在bug,如果我理解没问题的话
   
   我觉得这么做是合理的
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] 客户端发起调用时配置重试次数时不生效 [dubbo-go]

Posted by "FinalT (via GitHub)" <gi...@apache.org>.
FinalT commented on issue #2598:
URL: https://github.com/apache/dubbo-go/issues/2598#issuecomment-2345201794

   resolved in #2717


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org