JoshRosen commented on code in PR #37282:
URL: https://github.com/apache/spark/pull/37282#discussion_r929510207


##########
sql/core/src/main/scala/org/apache/spark/sql/util/QueryExecutionListener.scala:
##########
@@ -81,7 +81,10 @@ class ExecutionListenerManager private[sql](
     loadExtensions: Boolean)
   extends Logging {
 
-  private val listenerBus = new ExecutionListenerBus(this, session)

Review Comment:
   Thinking about this some more, I don't think the `root -> child -> 
grandchild` session case will be common in Spark itself (I think the 
ThriftServer would only create one layer of child sessions), but that scenario 
might crop up in applications built on Spark. Given this, I'm going to roll 
back to what I had earlier with the `@volatile` Option and the initialization 
lock. It's a _bit_ ugly but not _that_ ugly and provides some additional 
benefit.



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

Reply via email to