diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java index 7919aaed9f320bd..42cd4e096e8933a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java @@ -819,6 +819,7 @@ public void addReturnResultFromRemoteExecutor(StmtExecutor executor) { } public void finalizeArrowFlightSqlRequest() { + setThreadLocalInfo(); for (StmtExecutor asynExecutor : returnResultFromRemoteExecutor) { asynExecutor.finalizeQuery(); } @@ -837,6 +838,7 @@ public void finalizeArrowFlightSqlRequest() { } } + remove(); setCommand(MysqlCommand.COM_SLEEP); clear(); }