-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add configurable for GrpcClient health check retry times #9056
Add configurable for GrpcClient health check retry times #9056
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #9056 +/- ##
=============================================
+ Coverage 43.66% 43.72% +0.06%
- Complexity 4776 4785 +9
=============================================
Files 912 913 +1
Lines 32599 32620 +21
Branches 3765 3769 +4
=============================================
+ Hits 14233 14263 +30
+ Misses 16963 16953 -10
- Partials 1403 1404 +1
Continue to review full report at Codecov.
|
@@ -103,22 +111,17 @@ public GrpcClient(String name) { | |||
|
|||
public GrpcClient(String name, Properties configProperties) { | |||
super(name); | |||
initGrpcClient(configProperties); | |||
initGrpcClient(configProperties, NACOS_CLIENT_GRPC_THREADPOOL_KEEPALIVETIME, NACOS_CLIENT_GRPC_TIMEOUT, |
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 list constants? If you want make them as an list or array, you can create an constant list in class or Constants
this.timeOut = Long.parseLong(configProperties.getProperty(NACOS_CLIENT_GRPC_TIMEOUT)); | ||
if (configProperties.contains(NACOS_CLIENT_GRPC_HEALTHCHECK_RETRY_TIMES)) { |
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 not use same way with other parameters?
e6f0245
to
5ebc461
Compare
* | ||
* @author karsonto | ||
*/ | ||
public class GrpcConsts { |
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.
Consts --> Constants
I think full name is more readable.
Fix the issue #9013
添加GrpcClient健康检查可重试机制
e.g. nacos.remote.client.grpc.health.retry
nacos.remote.client.grpc.health.timeout
Please do not create a Pull Request without creating an issue first.
What is the purpose of the change
XXXXX
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.