You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maxim Gekk (JIRA)" <ji...@apache.org> on 2018/08/25 13:55:00 UTC

[jira] [Updated] (SPARK-25240) A deadlock in ALTER TABLE RECOVER PARTITIONS

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

Maxim Gekk updated SPARK-25240:
-------------------------------
    Summary: A deadlock in ALTER TABLE RECOVER PARTITIONS  (was: Dead-lock in ALTER TABLE RECOVER PARTITIONS)

> A deadlock in ALTER TABLE RECOVER PARTITIONS
> --------------------------------------------
>
>                 Key: SPARK-25240
>                 URL: https://issues.apache.org/jira/browse/SPARK-25240
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: Maxim Gekk
>            Priority: Major
>
> Recover Partitions in ALTER TABLE is performed in recursive way by calling the scanPartitions() method. scanPartitions() lists files sequentially or in parallel if the [condition|https://github.com/apache/spark/blob/131ca146ed390cd0109cd6e8c95b61e418507080/sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala#L685] is true:
> {code:scala}
> partitionNames.length > 1 && statuses.length > threshold || partitionNames.length > 2
> {code}
> Parallel listening is executed on [the fixed thread pool|https://github.com/apache/spark/blob/131ca146ed390cd0109cd6e8c95b61e418507080/sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala#L622] which can have 8 threads in total. Dead lock occurs when all 8 cores have been already occupied and recursive call of scanPartitions() submits new parallel file listening.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org