You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/19 02:59:04 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #31881: [SPARK-34087][3.1][SQL] Fix memory leak of ExecutionListenerBus

HyukjinKwon commented on a change in pull request #31881:
URL: https://github.com/apache/spark/pull/31881#discussion_r597374876



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/util/QueryExecutionListener.scala
##########
@@ -76,7 +76,11 @@ trait QueryExecutionListener {
 class ExecutionListenerManager private[sql](session: SparkSession, loadExtensions: Boolean)
   extends Logging {
 
-  private val listenerBus = new ExecutionListenerBus(session)
+  private val listenerBus = new ExecutionListenerBus(session.sessionUUID)
+  session.sparkContext.listenerBus.addToSharedQueue(listenerBus)
+  session.sparkContext.cleaner.foreach { cleaner =>
+    cleaner.registerSparkListenerForCleanup(this, listenerBus)
+  }

Review comment:
       Oh, this is a backporting PR. @Ngone51 can we address the comment in a separate PR so that followup can also be ported back?




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

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