garlandz-db commented on code in PR #52895:
URL: https://github.com/apache/spark/pull/52895#discussion_r2495286610
##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectSessionManager.scala:
##########
@@ -333,13 +346,7 @@ class SparkConnectSessionManager extends Logging {
}
private def newIsolatedSession(): SparkSession = {
- val active = SparkSession.active
- if (active.sparkContext.isStopped) {
Review Comment:
the original pr: https://github.com/apache/spark/pull/43701 by Kent Yao. if
the spark context is stopped then active.newSession() would throw an exception
```
org.apache.spark.SparkException:
com.google.common.util.concurrent.UncheckedExecutionException:
java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext.
```
my guess: spark cluster prob isnt useful but technically you can call spark
connect apis still. so we can create a valid spark session and continue
handling the rpc.
however our fix is tangential to that error. we do not need to use active in
this case.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]