From ef1f66bb55677ac7aab3e6bdf0c9886e6ec9eb37 Mon Sep 17 00:00:00 2001 From: liupeiyue Date: Mon, 9 Dec 2024 18:05:27 +0800 Subject: [PATCH] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak --- .../kyuubi/engine/flink/operation/PlanOnlyStatement.scala | 2 +- .../apache/kyuubi/engine/spark/operation/ExecutePython.scala | 2 +- .../org/apache/kyuubi/engine/spark/operation/ExecuteScala.scala | 2 +- .../apache/kyuubi/engine/spark/operation/ExecuteStatement.scala | 2 +- .../apache/kyuubi/engine/trino/operation/ExecuteStatement.scala | 2 +- .../scala/org/apache/kyuubi/operation/ExecuteStatement.scala | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala index 0f90ce01028..66e54428d76 100644 --- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala +++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala @@ -71,7 +71,7 @@ class PlanOnlyStatement( explainOperation(statement) } } catch { - shutdownTimeoutMonitor + shutdownTimeoutMonitor() onError() } } diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecutePython.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecutePython.scala index 593a78e42b4..6cf525924b0 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecutePython.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecutePython.scala @@ -127,7 +127,7 @@ class ExecutePython( val ke = KyuubiSQLException("Error submitting python in background", rejected) setOperationException(ke) - shutdownTimeoutMonitor + shutdownTimeoutMonitor() throw ke } } else { diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteScala.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteScala.scala index a5fd68804f0..7db33f7668e 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteScala.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteScala.scala @@ -154,7 +154,7 @@ class ExecuteScala( val ke = KyuubiSQLException("Error submitting scala in background", rejected) setOperationException(ke) - shutdownTimeoutMonitor + shutdownTimeoutMonitor() throw ke } } else { diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteStatement.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteStatement.scala index 40657828c98..7cb2dee3656 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteStatement.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteStatement.scala @@ -124,7 +124,7 @@ class ExecuteStatement( val ke = KyuubiSQLException("Error submitting query in background, query rejected", rejected) setOperationException(ke) - shutdownTimeoutMonitor + shutdownTimeoutMonitor() throw ke } } else { diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/ExecuteStatement.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/ExecuteStatement.scala index 3ecc72b772a..ad42d9b05a8 100644 --- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/ExecuteStatement.scala +++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/ExecuteStatement.scala @@ -76,7 +76,7 @@ class ExecuteStatement( val ke = KyuubiSQLException("Error submitting query in background, query rejected", rejected) setOperationException(ke) - shutdownTimeoutMonitor + shutdownTimeoutMonitor() throw ke } } else { diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala index c9f4a74cff4..27f0b1818be 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala @@ -173,7 +173,7 @@ class ExecuteStatement( val opHandle = sessionManager.submitBackgroundOperation(asyncOperation) setBackgroundHandle(opHandle) } catch { - shutdownTimeoutMonitor + shutdownTimeoutMonitor() onError("submitting query in background, query rejected") }