You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ramakrishna chilaka (Jira)" <ji...@apache.org> on 2022/01/04 04:39:00 UTC

[jira] [Updated] (SPARK-37797) Spark Thrift Server's query timeout doesn't cancel the synchronous query

     [ https://issues.apache.org/jira/browse/SPARK-37797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ramakrishna chilaka updated SPARK-37797:
----------------------------------------
    Description: 
override protected def cleanup(): Unit = {
    if (runInBackground) {
      val backgroundHandle = getBackgroundHandle()
      if (backgroundHandle != null) {
        logInfo("background handle is " + backgroundHandle.toString)
        backgroundHandle.cancel(true)
      } else {
        logInfo(" background handle is null")
      }
    } else {
      logInfo("not running in background")
    }
    // RDDs will be cleaned automatically upon garbage collection.
    if (statementId != null) {
      sqlContext.sparkContext.cancelJobGroup(statementId)
    }
  }

^^^ cleanup only happens when the thread is running in the background. sync queries are not executed in background.

  was:
override protected def cleanup(): Unit = {
    if (runInBackground) {
      val backgroundHandle = getBackgroundHandle()
      if (backgroundHandle != null) {
        logInfo("NFER: background handle is " + backgroundHandle.toString)
        backgroundHandle.cancel(true)
      } else {
        logInfo(" background handle is null")
      }
    } else {
      logInfo("not running in background")
    }
    // RDDs will be cleaned automatically upon garbage collection.
    if (statementId != null) {
      sqlContext.sparkContext.cancelJobGroup(statementId)
    }
  }

^^^ cleanup only happens when the thread is running in the background. sync queries are not executed in background.


> Spark Thrift Server's query timeout doesn't cancel the synchronous query 
> -------------------------------------------------------------------------
>
>                 Key: SPARK-37797
>                 URL: https://issues.apache.org/jira/browse/SPARK-37797
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: ramakrishna chilaka
>            Priority: Major
>
> override protected def cleanup(): Unit = {
>     if (runInBackground) {
>       val backgroundHandle = getBackgroundHandle()
>       if (backgroundHandle != null) {
>         logInfo("background handle is " + backgroundHandle.toString)
>         backgroundHandle.cancel(true)
>       } else {
>         logInfo(" background handle is null")
>       }
>     } else {
>       logInfo("not running in background")
>     }
>     // RDDs will be cleaned automatically upon garbage collection.
>     if (statementId != null) {
>       sqlContext.sparkContext.cancelJobGroup(statementId)
>     }
>   }
> ^^^ cleanup only happens when the thread is running in the background. sync queries are not executed in background.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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