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

Remove unmeaning logic #855

Merged
merged 2 commits into from
Dec 1, 2020
Merged

Remove unmeaning logic #855

merged 2 commits into from
Dec 1, 2020

Conversation

wenxuwan
Copy link
Member

@wenxuwan wenxuwan commented Nov 8, 2020

What this PR does:

Remove the unmeaning variables in RegistryDataListener and change unlock to defer.

@@ -290,20 +290,17 @@ func (r *zkRegistry) getCloseListener(conf *common.URL) (*RegistryConfigurationL

var zkListener *RegistryConfigurationListener
r.dataListener.mutex.Lock()
defer r.dataListener.mutex.Unlock()
Copy link
Member

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?

Copy link
Member Author

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.

@AlexStocks
Copy link
Contributor

wait for @CodingSinger's comment

@CodingSinger
Copy link
Member

wait for @CodingSinger's comment

看了下之前的pr,这里应该是忘了写了,应该在close以及替换的时候设置close为true

Copy link
Member

@zouyx zouyx left a 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

@wenxuwan
Copy link
Member Author

Make checks pass pls

done

@codecov-io
Copy link

Codecov Report

Merging #855 (1942615) into develop (e11faed) will increase coverage by 0.12%.
The diff coverage is 20.00%.

Impacted file tree graph

@@             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              
Impacted Files Coverage Δ
registry/zookeeper/registry.go 51.11% <0.00%> (-0.77%) ⬇️
registry/zookeeper/listener.go 67.16% <100.00%> (+0.49%) ⬆️
remoting/kubernetes/listener.go 50.52% <0.00%> (ø)
remoting/getty/pool.go 69.60% <0.00%> (+0.88%) ⬆️
remoting/kubernetes/watch.go 79.34% <0.00%> (+2.17%) ⬆️
remoting/kubernetes/registry_controller.go 51.42% <0.00%> (+5.30%) ⬆️

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 e11faed...85544c7. Read the comment docs.

@zouyx zouyx merged commit fb86fc9 into apache:develop Dec 1, 2020
@zouyx zouyx added this to the v1.5.5 milestone Dec 1, 2020
AlexStocks pushed a commit that referenced this pull request Apr 14, 2021
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.

6 participants