You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/03/24 09:50:00 UTC

[jira] [Assigned] (SPARK-34855) SparkContext - avoid using local lazy val

     [ https://issues.apache.org/jira/browse/SPARK-34855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Apache Spark reassigned SPARK-34855:
------------------------------------

    Assignee: Apache Spark

> 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
>            Assignee: Apache Spark
>            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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org