Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.4.7
-
None
Description
`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.