wucheng1997 commented on code in PR #10544:
URL: https://github.com/apache/dubbo/pull/10544#discussion_r963478802
##########
dubbo-xds/src/main/java/org/apache/dubbo/registry/xds/util/protocol/AbstractProtocol.java:
##########
@@ -231,6 +234,16 @@ public void onNext(DiscoveryResponse value) {
@Override
public void onError(Throwable t) {
logger.error("xDS Client received error message! detail:", t);
+
+ if (t instanceof StatusRuntimeException) {
+ try {
+ StreamObserver<DiscoveryRequest> requestObserver =
xdsChannel.createDeltaDiscoveryRequest(new ResponseObserver(requestId));
+ requestObserverMap.put(requestId, requestObserver);
Review Comment:
> 这块重建后不需要重新发起请求吗? 重试的逻辑可以整合一起管理,包括网络抖动那些
这里没有重建xdsChannel,实际上这个xdsChannel一直是有效的,出问题是因为observer在执行了onError方法之后,无法在执行onNext,导致了出现后面observer无法工作,无法感知路由变化。所以我这里新建了一个observer。等下一次与istio通信就可以正常工作。
channel的一些重试等操作在grpc中应该已经有实现。
--
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]