[
https://issues.apache.org/jira/browse/SPARK-34855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17307718#comment-17307718
]
Apache Spark commented on SPARK-34855:
--------------------------------------
User 'lxian' has created a pull request for this issue:
https://github.com/apache/spark/pull/31953
> 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
> Priority: Minor
> 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: [email protected]
For additional commands, e-mail: [email protected]