You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/07/03 22:18:41 UTC

[GitHub] [spark] maropu commented on a change in pull request #28991: [SPARK-26533][SQL][test-hive1.2] Support query auto timeout cancel on thriftserver

maropu commented on a change in pull request #28991:
URL: https://github.com/apache/spark/pull/28991#discussion_r449712600



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala
##########
@@ -349,6 +357,17 @@ private[hive] class SparkExecuteStatementOperation(
     }
   }
 
+  def timeoutCancel(): Unit = {
+    synchronized {
+      if (!getStatus.getState.isTerminal) {
+        logInfo(s"Timeout and Cancel query with $statementId ")
+        cleanup()
+        setState(OperationState.TIMEDOUT)

Review comment:
       > Please setState before cleanup. It's an open bug, see #28912
   
   Yea, nice suggestion! Might be better to add tests for that case, too.




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

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



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