diff --git a/src/main/java/com/actiontech/dble/net/service/AbstractService.java b/src/main/java/com/actiontech/dble/net/service/AbstractService.java index 35fde07cb..708569193 100644 --- a/src/main/java/com/actiontech/dble/net/service/AbstractService.java +++ b/src/main/java/com/actiontech/dble/net/service/AbstractService.java @@ -162,7 +162,7 @@ public abstract class AbstractService extends VariablesService implements Servic connection.getSocketWR().disableReadForever(); } if (closeTask.isFirst() && !connection.isOnlyFrontTcpConnected()) { - LOGGER.info("prepare close for conn.conn id {},reason [{}]", connection.getId(), closeTask.getReasonsStr()); + LOGGER.info("prepare close for conn {},reason [{}]", connection, closeTask.getReasonsStr()); } break; diff --git a/src/main/java/com/actiontech/dble/services/mysqlsharding/MySQLResponseService.java b/src/main/java/com/actiontech/dble/services/mysqlsharding/MySQLResponseService.java index afa9e9d53..9b0bd0687 100644 --- a/src/main/java/com/actiontech/dble/services/mysqlsharding/MySQLResponseService.java +++ b/src/main/java/com/actiontech/dble/services/mysqlsharding/MySQLResponseService.java @@ -12,6 +12,7 @@ import com.actiontech.dble.net.handler.BackEndRecycleRunnable; import com.actiontech.dble.net.mysql.*; import com.actiontech.dble.net.response.*; import com.actiontech.dble.net.service.ServiceTask; +import com.actiontech.dble.net.service.ServiceTaskType; import com.actiontech.dble.net.service.WriteFlags; import com.actiontech.dble.route.RouteResultsetNode; import com.actiontech.dble.server.NonBlockingSession; @@ -494,6 +495,9 @@ public class MySQLResponseService extends BackendService { @Override protected void beforeInsertServiceTask(@NotNull ServiceTask task) { super.beforeInsertServiceTask(task); + if (task.getType() == ServiceTaskType.CLOSE) { + return; + } if (session != null) { session.setBackendResponseTime(this); }