qinliujie commented on a change in pull request #9424:
URL: https://github.com/apache/dubbo/pull/9424#discussion_r770326239
##########
File path:
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java
##########
@@ -167,21 +149,12 @@ public void addStateRouters(List<StateRouter<T>>
stateRouters) {
BitList<Invoker<T>> resultInvokers = availableInvokers.clone();
// 1. route state router
- for (StateRouter<T> stateRouter : stateRouters) {
- StateRouterResult<Invoker<T>> routeResult =
stateRouter.route(resultInvokers, url, invocation, false);
- resultInvokers = routeResult.getResult();
- if (resultInvokers.isEmpty() && shouldFailFast) {
- printRouterSnapshot(url, availableInvokers, invocation);
- return BitList.emptyList();
- }
-
- // stop continue routing
- if (!routeResult.isNeedContinueRoute()) {
- return routeResult.getResult();
- }
+ resultInvokers = headStateRouter.route(resultInvokers, url,
invocation, false, null);
+ if (resultInvokers.isEmpty() && shouldFailFast) {
+ printRouterSnapshot(url, availableInvokers, invocation);
+ return BitList.emptyList();
}
-
if (routers.isEmpty()) {
Review comment:
if resultInvokers and routers both is empty,and it will not print router
snapshot
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]