-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[type:fix] Make the default value of ShenyuDubboService annotation equal to that of DubboService annotation #5816
base: master
Are you sure you want to change the base?
Conversation
…ual to that of DubboService annotation
|
||
/** | ||
* Alias for {@link DubboService#loadbalance()} . | ||
* | ||
* @return the string | ||
*/ | ||
@AliasFor(annotation = DubboService.class) | ||
String loadbalance() default LoadbalanceRules.RANDOM; | ||
String loadbalance() default LoadbalanceRules.EMPTY; |
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 empty
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.
This is the default value for DubboService annotation. Empty and random are different. If the configuration file specifies load balancing is RoundRobin, then the final result for Empty is RoundRobin.
@@ -202,7 +199,7 @@ | |||
* @return the int | |||
*/ | |||
@AliasFor(annotation = DubboService.class) | |||
int delay() default 0; | |||
int delay() default -1; |
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.
What's the difference between -1 and 0?
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.
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.
Keeping the default values consistent can make the behavior of two annotations consistent. Even if there is currently no difference between the two, they are still compatible with Dubbo's future modifications
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.
Yes, good job.
close #5815
Make sure that:
./mvnw clean install -Dmaven.javadoc.skip=true
.