You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "xuyu-co (via GitHub)" <gi...@apache.org> on 2025/06/22 15:32:29 UTC

[PR] [SPARK-52546][CORE] check SparkContext if has stopped when running catch code block in execute(), otherwise, it will return wrong state. [spark]

xuyu-co opened a new pull request, #51243:
URL: https://github.com/apache/spark/pull/51243

   ### What changes were proposed in this pull request?
   
   When running execute() in SparkExecuteStatementOperation.scala, SparkContext crashes, and runs into catch code block, we should check SparkContext if has stopped, otherwise, running cancelJobGroup() in a stopped SparkContext will result in an uncaught IllegalStateException being thrown, which will run into finally code block and return wrong state "FINISHED".
   
   ### Why are the changes needed?
   
   When SparkContext crashes in executing sql, state in Operation.scala should be set "error", but eventually return "finished”,which needs to be fixed.
   
   ### Does this PR introduce _any_ user-facing change?
   NO
   
   ### How was this patch tested?
   Test in spark environment and test cases as much as possible.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No


-- 
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-unsubscribe@spark.apache.org

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


Re: [PR] [SPARK-52546][SQL] check sparkContext if has stopped when running catch code block in execute(), otherwise, it will return wrong state. [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #51243: [SPARK-52546][SQL] check sparkContext if has stopped when running catch code block in execute(), otherwise, it will return wrong state.
URL: https://github.com/apache/spark/pull/51243


-- 
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-unsubscribe@spark.apache.org

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


Re: [PR] [SPARK-52546][SQL] check sparkContext if has stopped when running catch code block in execute(), otherwise, it will return wrong state. [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #51243:
URL: https://github.com/apache/spark/pull/51243#issuecomment-2998491379

   Merged to master.


-- 
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-unsubscribe@spark.apache.org

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