You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "jdesjean (via GitHub)" <gi...@apache.org> on 2023/07/14 15:31:48 UTC

[GitHub] [spark] jdesjean commented on a diff in pull request #41443: [SPARK-43923][CONNECT] Post listenerBus events during ExecutePlanRequest

jdesjean commented on code in PR #41443:
URL: https://github.com/apache/spark/pull/41443#discussion_r1263867972


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SessionHolder.scala:
##########
@@ -99,12 +101,19 @@ case class SessionHolder(userId: String, sessionId: String, session: SparkSessio
    */
   def classloader: ClassLoader = artifactManager.classloader
 
+  private[connect] def initializeSession(): Unit = {
+    events.postStarted()
+  }
+
   /**
    * Expire this session and trigger state cleanup mechanisms.
    */
   private[connect] def expireSession(): Unit = {
     logDebug(s"Expiring session with userId: $userId and sessionId: $sessionId")
     artifactManager.cleanUpResources()
+    val blockManager = session.sparkContext.env.blockManager
+    blockManager.removeCache(userId, sessionId)

Review Comment:
   Looks like this is a bad merge. It in SparkConnectService.RemoveSessionListener at some point, but is no longer there.
   Removed



##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SessionHolder.scala:
##########
@@ -99,12 +101,19 @@ case class SessionHolder(userId: String, sessionId: String, session: SparkSessio
    */
   def classloader: ClassLoader = artifactManager.classloader
 
+  private[connect] def initializeSession(): Unit = {
+    events.postStarted()
+  }
+
   /**
    * Expire this session and trigger state cleanup mechanisms.
    */
   private[connect] def expireSession(): Unit = {
     logDebug(s"Expiring session with userId: $userId and sessionId: $sessionId")
     artifactManager.cleanUpResources()
+    val blockManager = session.sparkContext.env.blockManager
+    blockManager.removeCache(userId, sessionId)

Review Comment:
   Looks like this is a bad merge. It was in SparkConnectService.RemoveSessionListener at some point, but is no longer there.
   Removed



-- 
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