From 0787195f7a973e83abbf2bbb3151e019ea718fce Mon Sep 17 00:00:00 2001 From: wd2365151147 <2365151147@qq.com> Date: Fri, 1 Jul 2022 15:55:17 +0800 Subject: [PATCH] =?UTF-8?q?[inner-1762]=20fix=EF=BC=9Ano=20handler=20(cher?= =?UTF-8?q?ry=20pick)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dble/backend/mysql/nio/MySQLConnection.java | 6 ++++++ .../dble/backend/mysql/nio/MySQLConnectionHandler.java | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/actiontech/dble/backend/mysql/nio/MySQLConnection.java b/src/main/java/com/actiontech/dble/backend/mysql/nio/MySQLConnection.java index 0dfe77d19..30fead248 100644 --- a/src/main/java/com/actiontech/dble/backend/mysql/nio/MySQLConnection.java +++ b/src/main/java/com/actiontech/dble/backend/mysql/nio/MySQLConnection.java @@ -549,6 +549,12 @@ public class MySQLConnection extends AbstractConnection implements this.recycler = recycler; } + public void backendSpecialCleanUp() { + isExecuting = false; + isRowDataFlowing = false; + this.signal(); + } + public void signal() { if (recycler != null) { recycler.signal(); diff --git a/src/main/java/com/actiontech/dble/backend/mysql/nio/MySQLConnectionHandler.java b/src/main/java/com/actiontech/dble/backend/mysql/nio/MySQLConnectionHandler.java index 7486714af..d1a5fabe1 100644 --- a/src/main/java/com/actiontech/dble/backend/mysql/nio/MySQLConnectionHandler.java +++ b/src/main/java/com/actiontech/dble/backend/mysql/nio/MySQLConnectionHandler.java @@ -227,12 +227,11 @@ public class MySQLConnectionHandler extends BackendAsyncHandler { if (session != null && !source.isTesting() && this.source.getLogResponse().compareAndSet(false, true)) { session.setBackendResponseEndTime(this.source); } - this.source.setExecuting(false); - this.source.setRowDataFlowing(false); this.source.getLogResponse().set(false); - this.source.signal(); - if (responseHandler != null) { - responseHandler.rowEofResponse(data, false, source); + ResponseHandler respHand = responseHandler; + if (respHand != null) { + this.source.backendSpecialCleanUp(); + respHand.rowEofResponse(data, false, source); } else { closeNoHandler(); }