Github user squito commented on the issue:

    https://github.com/apache/spark/pull/21185
  
    I don't understand the comments about "leaked threads".  the executor 
thread pool is allowed to create threads whenever it wants.  You can play 
around with this example if you like: 
https://gist.github.com/squito/8fc6533b1eeeb48559302c5898ae2c1d
    
    The only "leak" here is potentially using an InheritableThreadLocal for the 
activeSession at all. 
     `SparkSession.getActiveSession` is a public api so we probably don't want 
to change the thread-inheritance behavior that it currently has.  You could 
change `SparkSession.getActiveSession` to instead do the same thing itself, 
walking up the parent threads, but stopping if it hits an executor thread.  
But, seems more complex for no gain.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to