Skip to content
Snippets Groups Projects
  • Shixiong Zhu's avatar
    7ac70e7b
    [SPARK-13747][SQL] Fix concurrent executions in ForkJoinPool for SQL · 7ac70e7b
    Shixiong Zhu authored
    ## What changes were proposed in this pull request?
    
    Calling `Await.result` will allow other tasks to be run on the same thread when using ForkJoinPool. However, SQL uses a `ThreadLocal` execution id to trace Spark jobs launched by a query, which doesn't work perfectly in ForkJoinPool.
    
    This PR just uses `Awaitable.result` instead to  prevent ForkJoinPool from running other tasks in the current waiting thread.
    
    ## How was this patch tested?
    
    Jenkins
    
    Author: Shixiong Zhu <shixiong@databricks.com>
    
    Closes #15520 from zsxwing/SPARK-13747.
    7ac70e7b
    History
    [SPARK-13747][SQL] Fix concurrent executions in ForkJoinPool for SQL
    Shixiong Zhu authored
    ## What changes were proposed in this pull request?
    
    Calling `Await.result` will allow other tasks to be run on the same thread when using ForkJoinPool. However, SQL uses a `ThreadLocal` execution id to trace Spark jobs launched by a query, which doesn't work perfectly in ForkJoinPool.
    
    This PR just uses `Awaitable.result` instead to  prevent ForkJoinPool from running other tasks in the current waiting thread.
    
    ## How was this patch tested?
    
    Jenkins
    
    Author: Shixiong Zhu <shixiong@databricks.com>
    
    Closes #15520 from zsxwing/SPARK-13747.