You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by gu...@apache.org on 2022/07/11 07:50:14 UTC
[dubbo] branch 3.0 updated: [3.0-Triple] Fix duplicate wrap executor (#10293)
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 9c1630186f [3.0-Triple] Fix duplicate wrap executor (#10293)
9c1630186f is described below
commit 9c1630186f1886c07c02729503069edf6665f17c
Author: earthchen <ea...@gmail.com>
AuthorDate: Mon Jul 11 15:50:07 2022 +0800
[3.0-Triple] Fix duplicate wrap executor (#10293)
* fix wrap executor
* fix
* fix
---
.../apache/dubbo/rpc/protocol/tri/call/AbstractServerCall.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCall.java b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCall.java
index 1a2c31611d..76b1fb39f7 100644
--- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCall.java
+++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCall.java
@@ -20,7 +20,6 @@ package org.apache.dubbo.rpc.protocol.tri.call;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.logger.Logger;
import org.apache.dubbo.common.logger.LoggerFactory;
-import org.apache.dubbo.common.threadpool.serial.SerializingExecutor;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.rpc.CancellationContext;
import org.apache.dubbo.rpc.Invoker;
@@ -87,7 +86,8 @@ public abstract class AbstractServerCall implements ServerCall, ServerStream.Lis
Objects.requireNonNull(serviceDescriptor,
"No service descriptor found for " + invoker.getUrl());
this.invoker = invoker;
- this.executor = new SerializingExecutor(executor);
+ // is already serialized in the stream, so we don't need to serialize it again.
+ this.executor = executor;
this.frameworkModel = frameworkModel;
this.serviceDescriptor = serviceDescriptor;
this.serviceName = serviceName;
@@ -124,8 +124,8 @@ public abstract class AbstractServerCall implements ServerCall, ServerStream.Lis
if (closed) {
throw new IllegalStateException("Stream has already canceled");
}
- final Runnable sendMessage = () -> doSendMessage(message);
- executor.execute(sendMessage);
+ // is already in executor
+ doSendMessage(message);
}
private void doSendMessage(Object message) {
@@ -301,7 +301,7 @@ public abstract class AbstractServerCall implements ServerCall, ServerStream.Lis
public void close(TriRpcStatus status, Map<String, Object> attachments) {
- executor.execute(() -> doClose(status, attachments));
+ doClose(status, attachments);
}
private void doClose(TriRpcStatus status, Map<String, Object> attachments) {