You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/01/10 07:55:38 UTC

[GitHub] [dubbo] chickenlj commented on a change in pull request #9463: Fix callback timeout

chickenlj commented on a change in pull request #9463:
URL: https://github.com/apache/dubbo/pull/9463#discussion_r780955530



##########
File path: dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/ChannelWrappedInvoker.java
##########
@@ -71,7 +71,9 @@ protected Result doInvoke(Invocation invocation) throws Throwable {
                 currentClient.send(inv, getUrl().getMethodParameter(invocation.getMethodName(), SENT_KEY, false));
                 return AsyncRpcResult.newDefaultAsyncResult(invocation);
             } else {
-                CompletableFuture<AppResponse> appResponseFuture = currentClient.request(inv).thenApply(obj -> (AppResponse) obj);
+                final String methodName = RpcUtils.getMethodName(invocation);
+                final int timeout = calculateTimeout(invocation, methodName);
+                CompletableFuture<AppResponse> appResponseFuture = currentClient.request(inv, timeout, null).thenApply(obj -> (AppResponse) obj);

Review comment:
       I have two thoughts over this issue:
   1. Should we implicitly set all server push invokers to one-way mode inside the framework? 
   2. If 1 is not right, I think adding a timeout to server push RPC call is necessary, but simply using `url.getParameter("timeout")` would be enough, times spent during the should not be considered into the calculation.




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org