juliuszsompolski commented on code in PR #42304:
URL: https://github.com/apache/spark/pull/42304#discussion_r1283752471


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/ExecuteHolder.scala:
##########
@@ -156,11 +156,11 @@ private[connect] class ExecuteHolder(
   }
 
   /**
-   * Close the execution and remove it from the session. Note: It blocks 
joining the
-   * ExecuteThreadRunner thread, so it assumes that it's called when the 
execution is ending or
-   * ended. If it is desired to kill the execution, interrupt() should be 
called first.
+   * Close the execution and remove it from the session. Note: it first 
interrupts the runner if
+   * it's still running, and it waits for it to finish.
    */
   def close(): Unit = {
+    runner.interrupt()

Review Comment:
   This coincidentally fixes an issue in non-reattachable execution, where the 
RPC could go away, but the query would keep running and nothing would kill it.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to