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

[type:fix] Make the default value of ShenyuDubboService annotation equal to that of DubboService annotation #5816

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eye-gu
Copy link
Contributor

@eye-gu eye-gu commented Nov 27, 2024

close #5815

Make sure that:

  • You have read the contribution guidelines.
  • You submit test cases (unit or integration tests) that back your changes.
  • Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.


/**
* Alias for {@link DubboService#loadbalance()} .
*
* @return the string
*/
@AliasFor(annotation = DubboService.class)
String loadbalance() default LoadbalanceRules.RANDOM;
String loadbalance() default LoadbalanceRules.EMPTY;
Copy link
Member

Choose a reason for hiding this comment

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

why empty

Copy link
Contributor Author

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;
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@eye-gu eye-gu Nov 27, 2024

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

Copy link
Member

Choose a reason for hiding this comment

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

Yes, good job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] ShenyuDubboService annotation some default value not equals DubboService annotation
4 participants