AlbumenJ commented on issue #9826: URL: https://github.com/apache/dubbo/issues/9826#issuecomment-1075258310
[RouterSnapshot](https://github.com/apache/dubbo/pull/9112) in `org.apache.dubbo.rpc.cluster.RouterChain#logRouterSnapshot` can print router status if router's result is empty. It would be like ``` [ Parent (Input: 2) (Current Node Output: 2) (Chain Node Output: 0) ] Input: 192.168.31.105:20880,192.168.31.105:20881 -> Chain Node Output: Empty [ MockInvokersSelector (Input: 2) (Current Node Output: 2) (Chain Node Output: 0) Router message: invocation.need.mock not set. Return normal Invokers. ] Current Node Output: 192.168.31.105:20880,192.168.31.105:20881 [ StandardMeshRuleRouter (Input: 2) (Current Node Output: 2) (Chain Node Output: 0) Router message: MeshRuleCache has not been built. Skip route. ] Current Node Output: 192.168.31.105:20880,192.168.31.105:20881 [ TagStateRouter (Input: 2) (Current Node Output: 0) (Chain Node Output: 0) Router message: FAILOVER: return all Providers without any tags ] Current Node Output: Empty [ ServiceRouter (Input: 0) (Current Node Output: 0) (Chain Node Output: 0) Router message: Directly return. Reason: Invokers from previous router is empty or conditionRouters is empty. ] Current Node Output: Empty [ AppStateRouter (Input: 0) (Current Node Output: 0) (Chain Node Output: 0) Router message: Directly return. Reason: Invokers from previous router is empty or conditionRouters is empty. ] Current Node Output: Empty, dubbo version: 3.0.6-SNAPSHOT, current host: 192.168.31.105 ``` Also, `RpcContext.getServiceContext().setNeedPrintRouterSnapshot(true);`(or with telnet command) can enable router snapshot print switch for once. ``` [ Parent (Input: 2) (Current Node Output: 2) (Chain Node Output: 1) ] Input: 192.168.31.105:20880,192.168.31.105:20881 -> Chain Node Output: 192.168.31.105:20881 [ MockInvokersSelector (Input: 2) (Current Node Output: 2) (Chain Node Output: 1) Router message: invocation.need.mock not set. Return normal Invokers. ] Current Node Output: 192.168.31.105:20880,192.168.31.105:20881 [ StandardMeshRuleRouter (Input: 2) (Current Node Output: 2) (Chain Node Output: 1) Router message: MeshRuleCache has not been built. Skip route. ] Current Node Output: 192.168.31.105:20880,192.168.31.105:20881 [ TagStateRouter (Input: 2) (Current Node Output: 1) (Chain Node Output: 1) Router message: Use tag tag1 to route. Reason: result is not null OR it's null but force=true ] Current Node Output: 192.168.31.105:20881 [ ServiceRouter (Input: 1) (Current Node Output: 1) (Chain Node Output: 1) Router message: Directly return. Reason: Invokers from previous router is empty or conditionRouters is empty. ] Current Node Output: 192.168.31.105:20881 [ AppStateRouter (Input: 1) (Current Node Output: 1) (Chain Node Output: 1) Router message: Directly return. Reason: Invokers from previous router is empty or conditionRouters is empty. ] Current Node Output: 192.168.31.105:20881, dubbo version: 3.0.6-SNAPSHOT, current host: 192.168.31.105 ``` -- 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]
