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

issue#4314: ZookeeperDynamicConfiguration will be busy wait if zk is unavailable #4582

Merged
merged 2 commits into from
Jul 17, 2019
Merged

Conversation

beiwei30
Copy link
Member

What is the purpose of the change

fix #4134 and #4125

Brief changelog

dubbo-configcenter/dubbo-configcenter-zookeeper/src/main/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfiguration.java
dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/org/apache/dubbo/remoting/zookeeper/curator/CuratorZookeeperClient.java

Verifying this change

XXXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GITHUB_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

@beiwei30 beiwei30 requested a review from cvictory July 16, 2019 07:55
@codecov-io
Copy link

Codecov Report

Merging #4582 into master will increase coverage by 0.04%.
The diff coverage is 60%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #4582      +/-   ##
============================================
+ Coverage     63.29%   63.33%   +0.04%     
- Complexity      448      450       +2     
============================================
  Files           770      770              
  Lines         33008    33015       +7     
  Branches       5216     5217       +1     
============================================
+ Hits          20891    20911      +20     
+ Misses         9714     9704      -10     
+ Partials       2403     2400       -3
Impacted Files Coverage Δ Complexity Δ
...ting/zookeeper/curator/CuratorZookeeperClient.java 62.89% <100%> (ø) 0 <0> (ø) ⬇️
...pport/zookeeper/ZookeeperDynamicConfiguration.java 78.57% <50%> (-5.43%) 0 <0> (ø)
.../apache/dubbo/qos/protocol/QosProtocolWrapper.java 69.23% <0%> (-12.83%) 0% <0%> (ø)
...g/apache/dubbo/registry/consul/ConsulRegistry.java 59.6% <0%> (-0.67%) 27% <0%> (ø)
.../java/org/apache/dubbo/config/ReferenceConfig.java 59.48% <0%> (-0.37%) 0% <0%> (ø)
...g/context/annotation/DubboConfigConfiguration.java 66.66% <0%> (ø) 0% <0%> (ø) ⬇️
...pache/dubbo/registry/support/AbstractRegistry.java 81.6% <0%> (+0.38%) 0% <0%> (ø) ⬇️
...src/main/java/org/apache/dubbo/common/Version.java 62.62% <0%> (+1.57%) 0% <0%> (ø) ⬇️
...exchange/support/header/HeaderExchangeHandler.java 67.21% <0%> (+2.45%) 0% <0%> (ø) ⬇️
...bo/rpc/cluster/support/FailbackClusterInvoker.java 70.49% <0%> (+3.27%) 0% <0%> (ø) ⬇️
... and 7 more

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 05e44db...93f9cb2. Read the comment docs.

@tswstarplanet
Copy link
Contributor

tswstarplanet commented Jul 16, 2019

Should we add a flag to CuratorZookeeperClient to indicate if the INITIAL connection is established when we use ZookeeperRegistry ? If we don't check this, it will hang the main thread if the connection can not be established.

Copy link
Contributor

@cvictory cvictory left a comment

Choose a reason for hiding this comment

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

LGTM

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.

ZookeeperDynamicConfiguration will be busy wait if zk is unavailable.
4 participants