Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 notify sleep #2139

Merged
merged 1 commit into from Dec 15, 2022
Merged

3.0 notify sleep #2139

merged 1 commit into from Dec 15, 2022

Conversation

binbin0325
Copy link
Member

What this PR does:
修复consumer启动时立即发起调用,出现找不到provider的相关问题。本质原因是因为在consumer启动时会“异步”订阅provider,在发起调用时有可能订阅回调事件还没有被触发,从而导致找不到provider.

修改:在异步订阅前 先同步获取provider实例。(当前pr修改了nacos和polaris,后续可以按需实现zk,etcd.)

Which issue(s) this PR fixes:
Fixes #1991

You should pay attention to items below to ensure your pr passes our ci test
We do not merge pr with ci tests failed

  • All ut passed (run 'go test ./...' in project root)
  • After go-fmt ed , run 'go fmt project' using goland.
  • Golangci-lint passed, run 'sudo golangci-lint run' in project root.
  • Your new-created file needs to have apache license at the top, like other existed file does.
  • All integration test passed. You can run integration test locally (with docker env). Clone our dubbo-go-samples project and replace the go.mod to your dubbo-go, and run 'sudo sh start_integration_test.sh' at root of samples project root. (M1 Slice is not Support)

@binbin0325 binbin0325 changed the base branch from master to 3.0 November 26, 2022 12:57
@binbin0325 binbin0325 force-pushed the 3.0_notify_sleep branch 2 times, most recently from e06207f to d098bd6 Compare December 10, 2022 13:25
@codecov-commenter
Copy link

Codecov Report

Merging #2139 (d098bd6) into 3.0 (2e4e958) will decrease coverage by 0.05%.
The diff coverage is 6.66%.

@@            Coverage Diff             @@
##              3.0    #2139      +/-   ##
==========================================
- Coverage   44.26%   44.21%   -0.06%     
==========================================
  Files         283      283              
  Lines       17050    17076      +26     
==========================================
+ Hits         7548     7550       +2     
- Misses       8707     8731      +24     
  Partials      795      795              
Impacted Files Coverage Δ
registry/base_registry.go 1.41% <0.00%> (-0.02%) ⬇️
registry/etcdv3/registry.go 2.98% <0.00%> (-0.10%) ⬇️
registry/mock_registry.go 0.00% <0.00%> (ø)
registry/nacos/registry.go 42.07% <0.00%> (-3.93%) ⬇️
...try/servicediscovery/service_discovery_registry.go 1.25% <0.00%> (-0.02%) ⬇️
registry/zookeeper/registry.go 1.21% <0.00%> (-0.02%) ⬇️
registry/zookeeper/service_discovery.go 17.07% <0.00%> (ø)
registry/directory/directory.go 73.64% <50.00%> (-0.54%) ⬇️
cluster/loadbalance/ringhash/ring.go 87.32% <0.00%> (+2.81%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarcloud
Copy link

sonarcloud bot commented Dec 13, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@justxuewei justxuewei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @binbin0325, lgtm!

@justxuewei
Copy link
Member

I found that there is a ci failed, and I triggered it to rerun.

@justxuewei justxuewei merged commit 18995c7 into apache:3.0 Dec 15, 2022
Lvnszn pushed a commit to Lvnszn/dubbo-go that referenced this pull request Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

泛化调用失败 Failed to invoke the method $invoke, No provider available for the service nacos
5 participants