MonkeyCanCode commented on code in PR #59952:
URL: https://github.com/apache/spark/pull/59952#discussion_r4429623027
##########
sql/core/src/main/scala/org/apache/spark/sql/internal/SessionState.scala:
##########
@@ -133,6 +133,21 @@ private[sql] class SessionState(
*/
def clone(newSparkSession: SparkSession): SessionState =
createClone(newSparkSession, this)
+ /**
+ * Release the resources owned by this `SessionState`: the catalogs loaded
by its
+ * [[CatalogManager]], then the session artifacts. Catalogs are closed first
since they may have
+ * been loaded by the session classloader, which is closed with the
artifacts. Clones have their
+ * own catalogs and artifacts, so closing a `SessionState` does not affect
its clones. No catalog
+ * can be loaded afterwards.
+ */
+ def close(): Unit = {
Review Comment:
This is known but out of the scope for this PR as this is for fixing Spark
Connect only. Once the change is taken, I can raise diff PR for fixing Thrift
and Streaming.
--
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]