Li Xian created SPARK-34855:
-------------------------------

             Summary: SparkContext - avoid using local lazy val
                 Key: SPARK-34855
                 URL: https://issues.apache.org/jira/browse/SPARK-34855
             Project: Spark
          Issue Type: Improvement
          Components: Spark Core
    Affects Versions: 2.4.7
            Reporter: Li Xian
         Attachments: Screen Shot 2021-03-24 at 5.41.22 PM.png

`org.apache.spark.SparkContext#getCallSite` uses local lazy val for `callsite`. 
But in scala 2.11, local lazy val need synchronization on the containing object 
`this` (see 
[https://docs.scala-lang.org/sips/improved-lazy-val-initialization.html#version-6---no-synchronization-on-this-and-concurrent-initialization-of-fields]
 and [https://github.com/scala/scala-dev/issues/133] )

`getCallSite` is called at the job submission, and thus will be a bottle neck 
if we are submitting a large amount of jobs on a single spark session. We 
observed thread blocked due to this in our load test.

!image-2021-03-24-17-42-50-412.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to