You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "LIU (Jira)" <ji...@apache.org> on 2024/08/28 18:02:00 UTC

[jira] [Updated] (SPARK-49448) Spark Connect ExecuteThreadRunner promise will always complete with success.

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

LIU updated SPARK-49448:
------------------------
    Description: 
{code:java}
//代码占位符
{code}
private class ExecutionThread(onCompletionPromise: Promise[Unit]) extends Thread(s"SparkConnectExecuteThread_opId=${executeHolder.operationId}") \{ override def run(): Unit = { try { execute() onCompletionPromise.success(()) } catch \{ case NonFatal(e) => onCompletionPromise.failure(e) } } }

 

execute method end with ErrorUtils.handleError() function call.  if any excetion throw. it will not catch by promise. is it better to catch real exceptions with promises instead of.

  was:
private class ExecutionThread(onCompletionPromise: Promise[Unit])
extends Thread(s"SparkConnectExecuteThread_opId=${executeHolder.operationId}") {
override def run(): Unit = {
try {
execute()
onCompletionPromise.success(())
} catch {
case NonFatal(e) =>
onCompletionPromise.failure(e)
}
}
}

 

execute method end with ErrorUtils.handleError() function call.  if any excetion throw. it will not catch by promise. is it better to catch real exceptions with promises instead of.


> Spark Connect ExecuteThreadRunner promise will always complete with success.
> ----------------------------------------------------------------------------
>
>                 Key: SPARK-49448
>                 URL: https://issues.apache.org/jira/browse/SPARK-49448
>             Project: Spark
>          Issue Type: Improvement
>          Components: Connect
>    Affects Versions: 4.0.0
>            Reporter: LIU
>            Priority: Minor
>
> {code:java}
> //代码占位符
> {code}
> private class ExecutionThread(onCompletionPromise: Promise[Unit]) extends Thread(s"SparkConnectExecuteThread_opId=${executeHolder.operationId}") \{ override def run(): Unit = { try { execute() onCompletionPromise.success(()) } catch \{ case NonFatal(e) => onCompletionPromise.failure(e) } } }
>  
> execute method end with ErrorUtils.handleError() function call.  if any excetion throw. it will not catch by promise. is it better to catch real exceptions with promises instead of.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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