## What is the purpose of the change
Enhance TagRouter: modify tag router strategy
## Brief changelog
Thanks kirito for making a new big feature at first time.
The key point is with current implement, an invocation with a tag can't return
all invokers in TagRouter.
So I suggest here:
Add a forceTag flag(TAG_FORCE_KEY = "tag.force"), default value is false.
1. When it's true, TagRouter strickly match invokers' tag.
- An invocation with "black" tag only match invokers with "black" tag.
- An invocation with empty tag only match invokers with empty tag.
- An invocation match no invokers will return no invokers.
2. When it's false(default), TagRouter match invokers' tag by the most invokers
strategy.
- An invocation with "black" tag match invokers with "black" tag. If no
invokers with "black" tag, return all invokers.
- An invocation with empty tag will match all invokers.
- An invocation match no invokers will return all invokers.
Then we can cover all conditions for using TagRouter.
## Verifying this change
UT passed.
[ Full content available at:
https://github.com/apache/incubator-dubbo/pull/2343 ]
This message was relayed via gitbox.apache.org for [email protected]