sarutak commented on code in PR #52083:
URL: https://github.com/apache/spark/pull/52083#discussion_r2299625834


##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/service/ExecuteHolder.scala:
##########
@@ -243,6 +243,9 @@ private[connect] class ExecuteHolder(
    *   true if it was not interrupted before, false if it was already 
interrupted.
    */
   def interrupt(): Boolean = {
+    if (eventsManager.status == ExecuteStatus.Pending) {
+      return false

Review Comment:
   > For the code change, according to the state transition, can we change the 
status to ExecuteStatus.Canceled status directly from the current 
ExecuteStatus.Pending because it's not started yet? In this case, we can return 
true.
   
   Actually, that was my first idea to solve this issue. But as I mentioned in 
the description, I found that didn't work because transitioning from `Pending` 
to `Canceled` causes another issue.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to