You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by su...@apache.org on 2023/04/11 05:01:43 UTC
[shardingsphere] branch master updated: Code cleanup for OKProxyState (#25091)
This is an automated email from the ASF dual-hosted git repository.
sunnianjun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 8cfc017dd9d Code cleanup for OKProxyState (#25091)
8cfc017dd9d is described below
commit 8cfc017dd9d6b15f8971b3d928db9ceef05ecf6b
Author: 吴伟杰 <wu...@apache.org>
AuthorDate: Tue Apr 11 13:01:35 2023 +0800
Code cleanup for OKProxyState (#25091)
---
.../shardingsphere/proxy/frontend/state/impl/OKProxyState.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/state/impl/OKProxyState.java b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/state/impl/OKProxyState.java
index c0fd1853c78..08276055970 100644
--- a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/state/impl/OKProxyState.java
+++ b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/state/impl/OKProxyState.java
@@ -38,14 +38,12 @@ public final class OKProxyState implements ProxyState {
@Override
public void execute(final ChannelHandlerContext context, final Object message, final DatabaseProtocolFrontendEngine databaseProtocolFrontendEngine, final ConnectionSession connectionSession) {
- CommandExecutorTask commandExecutorTask = new CommandExecutorTask(databaseProtocolFrontendEngine, connectionSession, context, message);
- ExecutorService executorService = determineSuitableExecutorService(context, message, databaseProtocolFrontendEngine, connectionSession);
+ ExecutorService executorService = determineSuitableExecutorService(context, connectionSession);
context.channel().config().setAutoRead(false);
- executorService.execute(commandExecutorTask);
+ executorService.execute(new CommandExecutorTask(databaseProtocolFrontendEngine, connectionSession, context, message));
}
- private ExecutorService determineSuitableExecutorService(final ChannelHandlerContext context, final Object message, final DatabaseProtocolFrontendEngine databaseProtocolFrontendEngine,
- final ConnectionSession connectionSession) {
+ private ExecutorService determineSuitableExecutorService(final ChannelHandlerContext context, final ConnectionSession connectionSession) {
if (requireOccupyThreadForConnection(connectionSession)) {
return ConnectionThreadExecutorGroup.getInstance().get(connectionSession.getConnectionId());
}