dubbo-go icon indicating copy to clipboard operation
dubbo-go copied to clipboard

consumer requests a offline provider without reporting an error

Open kep-w opened this issue 3 years ago • 6 comments

What happened: dubbo-go v3.0.1 (both consumer and provider). Used nacos as registration Center. When the provider is upgraded, the new provider is online, and the old provider is offline, but the consumer will still request the old service without reporting an error. If configure retries=2, it is useless, because there is no error in the first request, and the request is considered to be successful.

What you expected to happen: we hope the consumer can request new provider or reporting an error at least.

How to reproduce it (as minimally and precisely as possible): can offline the provider sees whether an error is reported after the consumer request.

Anything else we need to know?: golang version 1.15 cluster=failover retries=0 or retries=2 both no use. image

kep-w avatar Jun 29 '22 09:06 kep-w

@sanxun0325

AlexStocks avatar Jul 01 '22 13:07 AlexStocks

@kep-w problem cannot be reproduced,could you provide more information, such as the metadata information of service registration in NACOS such as: image

binbin0325 avatar Jul 11 '22 08:07 binbin0325

@kep-w hey, guy, could u pls tell us how to reproduce this bug? Or can u tell me ur dingding name?

AlexStocks avatar Jul 16 '22 22:07 AlexStocks

@kep-w hey, guy, could u pls tell us how to reproduce this bug? Or can u tell me ur dingding name?

hi, thanks for following and replying. u can try the following process to reproduce:

  1. one consumer and one provider start normally, and nacos has online info, consumer can request and get reply from provider
  2. just offline the provider from nacos. at this time, consumer will still request the offlined provider. But now nacos has no available provider, consumer should not request provider that have been offline. --> this is the first question
  3. stop the provider, means now no provider available in nacos and the offline provider is not running. But now, consumer still request the provider that are offline and not running, and got no error. --> this is the second question

kep-w avatar Jul 20 '22 09:07 kep-w

@kep-w hey, guy, could u pls tell us how to reproduce this bug? Or can u tell me ur dingding name?

hi, thanks for following and replying. u can try the following process to reproduce:

  1. one consumer and one provider start normally, and nacos has online info, consumer can request and get reply from provider
  2. just offline the provider from nacos. at this time, consumer will still request the offlined provider. But now nacos has no available provider, consumer should not request provider that have been offline. --> this is the first question
  3. stop the provider, means now no provider available in nacos and the offline provider is not running. But now, consumer still request the provider that are offline and not running, and got no error. --> this is the second question

ok. thanks again for your bug report.

Our community apache committer @sanxun0325 will follow your steps to repproduce this bug.

AlexStocks avatar Jul 20 '22 10:07 AlexStocks

The results I reproduced showed that there were obvious errors, image image image

I started a provider, a consumer,keep making requests from the consumer, and then closing the provider at any time, and I get errors。

consumer:

for {
		user, err := userProvider.GetUser(context.TODO(), &User{Name: "Alex001"})
		if err != nil {
			logger.Errorf("error: %v\n", err)
			os.Exit(1)
			return
		}
		logger.Infof("response result: %v\n", user)
	}

code example:https://github.com/apache/dubbo-go-samples/tree/master/registry/nacos

@kep-w You can tell me what's wrong with my operation or provide a demo project.

binbin0325 avatar Jul 22 '22 01:07 binbin0325