-
Notifications
You must be signed in to change notification settings - Fork 932
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
Ftr : add UnRegister and UnSubscribe for zookeeper Registry #510
Ftr : add UnRegister and UnSubscribe for zookeeper Registry #510
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/dubbo-2.7.5 #510 +/- ##
=======================================================
+ Coverage 66.38% 66.57% +0.19%
=======================================================
Files 184 199 +15
Lines 9717 10275 +558
=======================================================
+ Hits 6451 6841 +390
- Misses 2626 2776 +150
- Partials 640 658 +18
Continue to review full report at Codecov.
|
filter registry url params starting with dot
suggested to run off the scene of ZK disconnection at last |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
err := reg.Register(url) | ||
assert.NoError(t, err) | ||
|
||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why add err != nil? by assert.NoError(t, err)
, when err != nil, the ut will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block is the same to Test_subsribe ,or you mean Test_subscribe is incorrect too ?
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not necessary. i think it is better to delete them. or other resons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hxmhlt can you remember the reason? If not , can i delete it?
LGTM |
have u tested this pr? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report
@@ Coverage Diff @@
## feature/dubbo-2.7.5 #510 +/- ##
=======================================================
+ Coverage 66.38% 66.76% +0.37%
=======================================================
Files 184 199 +15
Lines 9717 10272 +555
=======================================================
+ Hits 6451 6858 +407
- Misses 2626 2755 +129
- Partials 640 659 +19
Continue to review full report at Codecov.
|
func (r *BaseRegistry) createPath(dubboPath string) error { | ||
r.cltLock.Lock() | ||
defer r.cltLock.Unlock() | ||
return r.facadeBasedRegistry.CreatePath(dubboPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have u got the reason of lock facadeBasedRegistry.CreatePath by r.cltLock.Lock()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the source code as below, i just extract it.
dubbo-go/registry/base_registry.go
Line 240 in 8a3c02c
r.cltLock.Lock() |
dubbo-go/registry/base_registry.go
Line 288 in 8a3c02c
r.cltLock.Lock() |
dubbo-go/registry/base_registry.go
Line 300 in 8a3c02c
r.cltLock.Lock() |
What this PR does:
Which issue(s) this PR fixes:
Fixes #489
Special notes for your reviewer:
Does this PR introduce a user-facing change?: