This is an automated email from the ASF dual-hosted git repository.

guohao pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new 3ac0c37  [3.0-Triple] Fix error in filters can not be returned to 
client (#8615)
3ac0c37 is described below

commit 3ac0c3704636d28af4fe3a2473cc6fa62903239d
Author: GuoHao <[email protected]>
AuthorDate: Mon Aug 30 10:39:18 2021 +0800

    [3.0-Triple] Fix error in filters can not be returned to client (#8615)
    
    * Fix error in filters can not be returned to client
    
    * Try catch in parent method
---
 .../apache/dubbo/rpc/protocol/tri/AbstractServerStream.java   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git 
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/AbstractServerStream.java
 
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/AbstractServerStream.java
index c1df0ef..b3fe469 100644
--- 
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/AbstractServerStream.java
+++ 
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/AbstractServerStream.java
@@ -195,7 +195,16 @@ public abstract class AbstractServerStream extends 
AbstractStream implements Str
     @Override
     public void execute(Runnable runnable) {
         try {
-            super.execute(runnable);
+            super.execute(() -> {
+                try {
+                    runnable.run();
+                } catch (Throwable t) {
+                    LOGGER.error("Exception processing triple message", t);
+                    
transportError(GrpcStatus.fromCode(GrpcStatus.Code.INTERNAL)
+                            .withDescription("Exception in invoker chain :" + 
t.getMessage())
+                            .withCause(t));
+                }
+            });
         } catch (RejectedExecutionException e) {
             LOGGER.error("Provider's thread pool is full", e);
             
transportError(GrpcStatus.fromCode(GrpcStatus.Code.RESOURCE_EXHAUSTED)

Reply via email to