-
Notifications
You must be signed in to change notification settings - Fork 929
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
Remove unmeaning logic #855
Conversation
registry/zookeeper/registry.go
Outdated
@@ -290,20 +290,17 @@ func (r *zkRegistry) getCloseListener(conf *common.URL) (*RegistryConfigurationL | |||
|
|||
var zkListener *RegistryConfigurationListener | |||
r.dataListener.mutex.Lock() | |||
defer r.dataListener.mutex.Unlock() |
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.
If this lock use defer, will include listenerLock, is it right logic?
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.
No.....getListener use defer too, so here may be cause dead lock.
wait for @CodingSinger's comment |
看了下之前的pr,这里应该是忘了写了,应该在close以及替换的时候设置close为true |
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.
Make checks
pass pls
2346339
to
1942615
Compare
done |
Codecov Report
@@ Coverage Diff @@
## develop #855 +/- ##
===========================================
+ Coverage 59.91% 60.03% +0.12%
===========================================
Files 260 260
Lines 12807 12810 +3
===========================================
+ Hits 7673 7691 +18
+ Misses 4177 4162 -15
Partials 957 957
Continue to review full report at Codecov.
|
What this PR does:
Remove the unmeaning variables in RegistryDataListener and change unlock to defer.