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 too many connection of zookeeper datasource #788

Merged
merged 19 commits into from
Jun 27, 2019
Merged

fix too many connection of zookeeper datasource #788

merged 19 commits into from
Jun 27, 2019

Conversation

linlinisme
Copy link
Collaborator

@linlinisme linlinisme commented May 25, 2019

Describe what this PR does / why we need it

Fix "too many connections of zookeeper datasource"

Does this pull request fix one issue?

Related to #612

Describe how you did it

Save zkClient in a global map and reuse it

Describe how to verify it

  1. 5 rules enabled
  2. echo cons | nc zookeeper.host 2181
  3. check if there only exists one connection to zkServer

Special notes for reviews

@linlinisme linlinisme changed the title 20190524 zookeeper datasource Fix "too many connection of zookeeper datasource" May 25, 2019
@sczyh30 sczyh30 added the to-review To review label May 25, 2019
@linlinisme linlinisme changed the title Fix "too many connection of zookeeper datasource" fix too many connection of zookeeper datasource May 25, 2019
@codecov-io
Copy link

codecov-io commented May 25, 2019

Codecov Report

Merging #788 into master will increase coverage by 0.18%.
The diff coverage is 83.78%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #788      +/-   ##
============================================
+ Coverage     42.08%   42.27%   +0.18%     
- Complexity     1411     1420       +9     
============================================
  Files           307      307              
  Lines          8868     8897      +29     
  Branches       1200     1204       +4     
============================================
+ Hits           3732     3761      +29     
+ Misses         4679     4678       -1     
- Partials        457      458       +1
Impacted Files Coverage Δ Complexity Δ
...inel/datasource/zookeeper/ZookeeperDataSource.java 67.32% <83.78%> (+6.21%) 16 <6> (+7) ⬆️
...a/csp/sentinel/slots/statistic/base/LeapArray.java 70.29% <0%> (ø) 34% <0%> (ø) ⬇️
...tinel/slots/block/flow/param/ParamFlowChecker.java 55.4% <0%> (+2.7%) 29% <0%> (+1%) ⬆️
...ava/com/alibaba/csp/sentinel/node/ClusterNode.java 100% <0%> (+4.76%) 8% <0%> (+1%) ⬆️

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 66b9198...a80ee87. Read the comment docs.

@sczyh30
Copy link
Member

sczyh30 commented Jun 17, 2019

Friendly ping :)

Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

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

Could you please add some basic test cases?

@sczyh30 sczyh30 added the kind/enhancement Category issues or prs related to enhancement. label Jun 24, 2019
@linlinisme
Copy link
Collaborator Author

test cases had added

@linlinisme
Copy link
Collaborator Author

friendly ping :)

Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

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

LGTM

@sczyh30 sczyh30 removed the to-review To review label Jun 27, 2019
@sczyh30 sczyh30 merged commit ba14676 into alibaba:master Jun 27, 2019
@sczyh30
Copy link
Member

sczyh30 commented Jun 27, 2019

Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants