Github user bbossy commented on the issue:

    https://github.com/apache/spark/pull/18269
  
    @mallman I'm not sure where this difference in behaviour is coming from. 
The following test in `FileIndexSuite` passes:
    
    ```
     test("mallman's scenario") {
        withSQLConf(SQLConf.PARALLEL_PARTITION_DISCOVERY_THRESHOLD.key -> "10") 
{
          withTempDir { dir =>
            for (chunk <- 1.to(27)) {
              val f = new File(dir, s"ds=1/h=one/chunk=$chunk/file.parquet")
              f.getParentFile.mkdirs()
              f.createNewFile()
            }
            for (chunk <- 1.to(24)) {
              val f = new File(dir, s"ds=1/h=two/chunk=$chunk/file.parquet")
              f.getParentFile.mkdirs()
              f.createNewFile()
            }
            HiveCatalogMetrics.reset()
            
assert(HiveCatalogMetrics.METRIC_PARALLEL_LISTING_JOB_COUNT.getCount() == 0)
            new InMemoryFileIndex(spark, Seq(new Path(dir.getCanonicalPath)), 
Map.empty, None)
            
assert(HiveCatalogMetrics.METRIC_PARALLEL_LISTING_JOB_COUNT.getCount() == 1)
          }
        }
      }
    ```
    Does it match your scenario?
    
    I'll dig around a bit later to see if I can come up with an explanation.


---
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]

Reply via email to