diff --git a/be/src/exec/hdfs-scan-node.cc b/be/src/exec/hdfs-scan-node.cc index d7fb6ff..2c6f2af 100644 --- a/be/src/exec/hdfs-scan-node.cc +++ b/be/src/exec/hdfs-scan-node.cc @@ -744,6 +744,10 @@ bool HdfsScanNode::EnoughMemoryForScannerThread(bool new_thread) { } void HdfsScanNode::ThreadTokenAvailableCb(ThreadResourceMgr::ResourcePool* pool) { + // We have not issued the initial ranges so don't start a scanner thread. Issuing + // ranges will call this function and we'll start the scanner threads then. + if (!initial_ranges_issued_) return; + // This is called to start up new scanner threads. It's not a big deal if we // spin up more than strictly necessary since they will go through and terminate // promptly. However, we want to minimize that by checking a conditions.