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

Fix: spring cloud error and refactor event callback #367

Merged
merged 8 commits into from
Feb 26, 2022

Conversation

PhilYue
Copy link
Member

@PhilYue PhilYue commented Feb 20, 2022

What this PR does:

  1. fix spring cloud error that "zookeeper node not exist or some other"
  2. add zookeeper root path config for spring cloud change the discovery root, like "/services"
  3. refactor the watch event handle

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2022

Codecov Report

Merging #367 (3dbbc02) into develop-0.5.0 (44f09ad) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##           develop-0.5.0     #367   +/-   ##
==============================================
  Coverage          39.66%   39.66%           
==============================================
  Files                 52       52           
  Lines               3061     3061           
==============================================
  Hits                1214     1214           
  Misses              1717     1717           
  Partials             130      130           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44f09ad...3dbbc02. Read the comment docs.

@PhilYue PhilYue changed the base branch from develop to develop-0.5.0 February 20, 2022 12:19
@PhilYue PhilYue changed the title Fix: spring cloud error and refactor event callback [WIP] Fix: spring cloud error and refactor event callback Feb 20, 2022
@PhilYue PhilYue changed the title [WIP] Fix: spring cloud error and refactor event callback Fix: spring cloud error and refactor event callback Feb 20, 2022
for _, instance := range discovery.getServiceMap()[sn] {
discovery.delServiceInstance(instance)
}
if !contains(fetchChildren, sn) {
Copy link
Member

Choose a reason for hiding this comment

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

fix this.

Copy link
Member Author

Choose a reason for hiding this comment

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

done


for _, serviceName := range fetchChildren {
serviceNodePath := strings.Join([]string{z.servicesPath, serviceName}, constant.PathSlash)
instances := serviceMap[serviceName]
if instances == nil || len(instances) == 0 {
z.svcListeners.RemoveListener(serviceNodePath)
Copy link
Member

Choose a reason for hiding this comment

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

Same

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@ztelur ztelur merged commit dcb7ae1 into apache:develop-0.5.0 Feb 26, 2022
bobtthp pushed a commit to bobtthp/dubbo-go-pixiu that referenced this pull request Dec 12, 2022
* rm all output file when make clean

* 1. fix error log and event callback

2. add zookeeper root path config

* fmt...

* close the service instance listener when it not working and after retry

* fix the CI

* clean

Co-authored-by: Randy <[email protected]>
Co-authored-by: Xin.Zh <[email protected]>
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.

5 participants