Github user srowen commented on the issue:
https://github.com/apache/spark/pull/18216
OK, I tried this as a test:
```
import scala.collection.JavaConverters._
spark.sql("DROP TABLE IF EXISTS my_tab")
spark.sql("CREATE TABLE my_tab(a INT, b STRING, c INT, d String) USING
parquet PARTITIONED BY (a, b, c)")
spark.sql("INSERT INTO TABLE my_tab VALUES (1, 'foo', 4, 'bing')")
spark.sql("INSERT INTO TABLE my_tab VALUES (2, 'bar', 5, 'bing')")
spark.sql("INSERT INTO TABLE my_tab VALUES (3, 'baz', 6, 'bing')")
Thread.getAllStackTraces.keySet().asScala.map(_.getName).filter(_.contains("ForkJoinPool"))
res5: scala.collection.mutable.Set[String] = Set(ForkJoinPool-1-worker-13)
spark.sql("ALTER TABLE my_tab RECOVER PARTITIONS")
Thread.getAllStackTraces.keySet().asScala.map(_.getName).filter(_.contains("ForkJoinPool"))
res10: scala.collection.mutable.Set[String] = Set(ForkJoinPool-1-worker-13,
ForkJoinPool-1-worker-9, ForkJoinPool-2-worker-13)
spark.sql("ALTER TABLE my_tab RECOVER PARTITIONS")
spark.sql("ALTER TABLE my_tab RECOVER PARTITIONS")
spark.sql("ALTER TABLE my_tab RECOVER PARTITIONS")
res23: scala.collection.mutable.Set[String] = Set(ForkJoinPool-5-worker-13,
ForkJoinPool-3-worker-13, ForkJoinPool-2-worker-13, ForkJoinPool-1-worker-11,
ForkJoinPool-4-worker-13, ForkJoinPool-1-worker-3)
```
Before the change you can see that it does look like one thread is left
from each of several ForkJoinPools.
After the change, the result is `Set(ForkJoinPool-1-worker-13)` every time.
I think that does suggest this fixes the issue.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]