TeslaCN commented on a change in pull request #10189:
URL: https://github.com/apache/shardingsphere/pull/10189#discussion_r619769360



##########
File path: 
shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/state/impl/OKProxyState.java
##########
@@ -40,5 +40,6 @@ public void execute(final ChannelHandlerContext context, 
final Object message, f
         ExecutorService executorService = 
CommandExecutorSelector.getExecutorService(
                 isOccupyThreadForPerConnection, supportHint, 
backendConnection.getTransactionStatus().getTransactionType(), 
context.channel().id());
         executorService.execute(new 
CommandExecutorTask(databaseProtocolFrontendEngine, backendConnection, context, 
message));
+        backendConnection.getSubmittedTaskCount().incrementAndGet();

Review comment:
       I think it is OK that add the submitted count after the task submitted.

##########
File path: 
shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/state/impl/OKProxyState.java
##########
@@ -40,5 +40,6 @@ public void execute(final ChannelHandlerContext context, 
final Object message, f
         ExecutorService executorService = 
CommandExecutorSelector.getExecutorService(
                 isOccupyThreadForPerConnection, supportHint, 
backendConnection.getTransactionStatus().getTransactionType(), 
context.channel().id());
         executorService.execute(new 
CommandExecutorTask(databaseProtocolFrontendEngine, backendConnection, context, 
message));
+        backendConnection.getSubmittedTaskCount().incrementAndGet();

Review comment:
       Maybe we can add count before execute and catch 
`RejectedExecutinoException`.




-- 
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.

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


Reply via email to