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

[Dubbo-7332] Fix QOS Ready command #7333

Merged
merged 3 commits into from
Mar 11, 2021
Merged

[Dubbo-7332] Fix QOS Ready command #7333

merged 3 commits into from
Mar 11, 2021

Conversation

nickwongwong
Copy link

@nickwongwong nickwongwong commented Mar 6, 2021

Fix QOS Ready command return OK when DubboBootstrap is not ready

What is the purpose of the change

Fix issue: #7332

Brief changelog

M dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java

Only change one line, which initializes ready as false instead of true.

image

Verifying this change

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.

Fix QOS Ready command return OK when DubboBootstrap is not ready
@nickwongwong
Copy link
Author

This bug may be caused by this problem.
#5873 (comment)
@Hinsteny

@codecov-io
Copy link

codecov-io commented Mar 6, 2021

Codecov Report

Merging #7333 (a65ec09) into master (eef6b45) will increase coverage by 0.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7333      +/-   ##
============================================
+ Coverage     59.06%   59.07%   +0.01%     
- Complexity      462      464       +2     
============================================
  Files          1044     1044              
  Lines         42480    42491      +11     
  Branches       6229     6231       +2     
============================================
+ Hits          25090    25103      +13     
+ Misses        14591    14589       -2     
  Partials       2799     2799              
Impacted Files Coverage Δ Complexity Δ
.../apache/dubbo/config/bootstrap/DubboBootstrap.java 41.89% <33.33%> (-0.14%) 0.00 <0.00> (ø)
...in/java/org/apache/dubbo/common/utils/JVMUtil.java 81.13% <0.00%> (-11.33%) 0.00% <0.00%> (ø%)
...he/dubbo/registry/multicast/MulticastRegistry.java 67.12% <0.00%> (-0.93%) 0.00% <0.00%> (ø%)
...org/apache/dubbo/registry/redis/RedisRegistry.java 49.21% <0.00%> (-0.79%) 28.00% <0.00%> (ø%)
...pache/dubbo/registry/support/AbstractRegistry.java 79.62% <0.00%> (-0.38%) 0.00% <0.00%> (ø%)
...va/org/apache/dubbo/common/utils/ReflectUtils.java 70.42% <0.00%> (-0.14%) 0.00% <0.00%> (ø%)
.../java/org/apache/dubbo/common/utils/PojoUtils.java 73.17% <0.00%> (+0.07%) 0.00% <0.00%> (ø%)
...n/java/org/apache/dubbo/common/utils/UrlUtils.java 74.25% <0.00%> (+0.33%) 0.00% <0.00%> (ø%)
...pache/dubbo/registry/support/FailbackRegistry.java 66.35% <0.00%> (+0.93%) 0.00% <0.00%> (ø%)
...che/dubbo/remoting/transport/mina/MinaChannel.java 51.31% <0.00%> (+1.31%) 17.00% <0.00%> (+1.00%)
... and 4 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 eef6b45...9abb4c5. Read the comment docs.

@AlbumenJ
Copy link
Member

AlbumenJ commented Mar 6, 2021

@nickwongwong hi, thanks for your contribution

If we modify the inital state of ready field, shall it can be adapted to the expose way by ServiceConfig?

ServiceConfig may not start DubboStarter and QOS Ready command will alaways fail.

@nickwongwong
Copy link
Author

@nickwongwong hi, thanks for your contribution

If we modify the inital state of ready field, shall it can be adapted to the expose way by ServiceConfig?

ServiceConfig may not start DubboStarter and QOS Ready command will alaways fail.

It may a good way to change the state of ready to true after ServiceConfig doExport, while keeping the initial state of ready to false.
Please review my new commits~

Copy link
Member

@horizonzy horizonzy left a comment

Choose a reason for hiding this comment

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

If there are two ServiceConfig, first success and second failed, the ready should be true?

@nickwongwong
Copy link
Author

If there are two ServiceConfig, first success and second failed, the ready should be true?

I think ready should reflect more status than just checking exported services.
But still, it's a good start, we can enhance it later together.

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

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

LGTM.

@AlbumenJ AlbumenJ merged commit e4f19e5 into apache:master Mar 11, 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.

4 participants