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
Use milliseconds as an interval unit in EurekaEndpointGroup
#3108
Conversation
Motivation: We almost always use milliseconds as the default unit for representing a duration or interval. `EurekaEndpointGroupBuilder.registryFetchIntervalSeconds()` is the only exception we have. Modifications: - Add `EurekaEndpointGroupBuilder.registryFetchIntervalMillis()` which deprecates `registryFetchIntervalSeconds()` - Miscellaneous: - Improved validation for `registryFetchInterval(Duration)` - `HealthCheckedEndpointGroupBuilder` now overrides `retryIntervalMillis()`. Result: - Consistency - (Deprecation) `EurekaEndpointGroupBuilder.registryFetchIntervalSeconds()` has been deprecated in favor of `registryFetchIntervalMillis()`.
I also find
|
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.
Thanks! @trustin
eureka/src/main/java/com/linecorp/armeria/client/eureka/EurekaEndpointGroupBuilder.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #3108 +/- ##
=========================================
Coverage 73.90% 73.91%
- Complexity 12305 12311 +6
=========================================
Files 1064 1064
Lines 46846 46877 +31
Branches 5949 5958 +9
=========================================
+ Hits 34623 34648 +25
+ Misses 9203 9191 -12
- Partials 3020 3038 +18 Continue to review full report at Codecov.
|
Updated |
Stil LGTM |
eureka/src/main/java/com/linecorp/armeria/client/eureka/EurekaEndpointGroupBuilder.java
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.
Thanks a lot!
Thanks for reviewing! |
Motivation:
We almost always use milliseconds as the default unit for representing a
duration or interval. However,
EurekaEndpointGroupBuilder
andEurekaUpdatingServerListener
uses seconds.
Modifications:
EurekaEndpointGroupBuilder.registryFetchIntervalMillis()
EurekeUpdatingServerListener.leaseDurationMillis()
EurekeUpdatingServerListener.renewalIntervalMillis()
EurekaEndpointGroupBuilder.registryFetchIntervalSeconds()
EurekeUpdatingServerListener.leaseDurationSeconds()
EurekeUpdatingServerListener.renewalIntervalSeconds()
registryFetchInterval(Duration)
HealthCheckedEndpointGroupBuilder
now overridesretryIntervalMillis()
.Result:
millis
-accepting versions:EurekaEndpointGroupBuilder.registryFetchIntervalSeconds()
EurekeUpdatingServerListener.leaseDurationSeconds()