Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-30556

Copy sparkContext.localproperties to child thread inSubqueryExec.executionContext

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4, 2.4.4, 3.0.0
    • Fix Version/s: 2.4.5, 3.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      Local properties set via sparkContext are not available as TaskContext properties when executing  jobs and threadpools have idle threads which are reused

      Explanation:
      When SubqueryExec, the relationFuture is evaluated via a separate thread. The threads inherit the localProperties from sparkContext as they are the child threads.
      These threads are controlled via the executionContext (thread pools). Each Thread pool has a default keepAliveSeconds of 60 seconds for idle threads.
      Scenarios where the thread pool has threads which are idle and reused for a subsequent new query, the thread local properties will not be inherited from spark context (thread properties are inherited only on thread creation) hence end up having old or no properties set. This will cause taskset properties to be missing when properties are transferred by child thread via sparkContext.runJob/submitJob

        Attachments

          Activity

            People

            • Assignee:
              ajithshetty Ajith S
              Reporter:
              ajithshetty Ajith S
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: