-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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-5872] use QOS command to check if app service is ready #5873
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5873 +/- ##
============================================
- Coverage 61.33% 61.19% -0.14%
+ Complexity 500 496 -4
============================================
Files 981 982 +1
Lines 39147 39165 +18
Branches 5645 5648 +3
============================================
- Hits 24011 23968 -43
- Misses 12516 12561 +45
- Partials 2620 2636 +16 Continue to review full report at Codecov.
|
@@ -155,6 +155,8 @@ | |||
|
|||
private AtomicBoolean started = new AtomicBoolean(false); | |||
|
|||
private AtomicBoolean ready = new AtomicBoolean(true); |
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.
Why is the default value not false
?
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.
Sometimes user would not call the DubboBootstrap.start method, so then the app ready function would not working, then the app should ready in default!
I think ready should reflect more status than just checking exported services, but still, it's a good start, we can enhance it later. |
What is the purpose of the change
Add one QOS command to check application is ready or not!
Brief changelog
M dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java
A dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/impl/Ready.java
M dubbo-plugin/dubbo-qos/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.qos.command.BaseCommand
M dubbo-plugin/dubbo-qos/src/test/java/org/apache/dubbo/qos/command/util/CommandHelperTest.java
Verifying this change
Follow this checklist to help us incorporate your contribution quickly and easily:
[Dubbo-XXX] Fix UnknownException when host config not exist #XXX
. Each commit in the pull request should have a meaningful subject line and body.mvn clean install -DskipTests=false
&mvn clean test-compile failsafe:integration-test
to make sure unit-test and integration-test pass.