Maxim Gekk created SPARK-25240: ---------------------------------- Summary: Dead-lock 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
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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org