spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao Li (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-25240) A deadlock in ALTER TABLE RECOVER PARTITIONS
Date Mon, 27 Aug 2018 16:48:00 GMT

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

Xiao Li updated SPARK-25240:
----------------------------
    Target Version/s: 2.4.0

> 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: Blocker
>
> 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


Mime
View raw message