-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
fix too many connection of zookeeper datasource #788
Conversation
using the LongAdder rather than AtomicInteger to Provides better performance
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
...okeeper/src/main/java/com/alibaba/csp/sentinel/datasource/zookeeper/ZookeeperDataSource.java
Outdated
Show resolved
Hide resolved
merge online
Friendly ping :) |
merge onlie
…okeeper-datasource
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.
Could you please add some basic test cases?
test cases had added |
friendly ping :) |
...okeeper/src/main/java/com/alibaba/csp/sentinel/datasource/zookeeper/ZookeeperDataSource.java
Outdated
Show resolved
Hide resolved
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
Thanks for contributing! |
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
echo cons | nc zookeeper.host 2181
Special notes for reviews