@@ -548,8 +548,8 @@ void PrestoServer::run() {
548548 }
549549 if (spillerExecutor_ != nullptr ) {
550550 PRESTO_STARTUP_LOG (INFO)
551- << " Spiller CPU executor '" << spillerExecutor_ ->getName () << " ', has "
552- << spillerExecutor_ ->numThreads () << " threads." ;
551+ << " Spiller CPU executor '" << spillerCpuExecutor_ ->getName ()
552+ << " ', has " << spillerCpuExecutor_ ->numThreads () << " threads." ;
553553 } else {
554554 PRESTO_STARTUP_LOG (INFO) << " Spill executor was not configured." ;
555555 }
@@ -560,7 +560,7 @@ void PrestoServer::run() {
560560 auto * asyncDataCache = velox::cache::AsyncDataCache::getInstance ();
561561 periodicTaskManager_ = std::make_unique<PeriodicTaskManager>(
562562 driverCpuExecutor_,
563- spillerExecutor_. get () ,
563+ spillerCpuExecutor_ ,
564564 httpSrvIoExecutor_.get (),
565565 httpSrvCpuExecutor_.get (),
566566 exchangeHttpIoExecutor_.get (),
@@ -836,10 +836,11 @@ void PrestoServer::initializeThreadPools() {
836836 threadFactory = std::make_shared<folly::NamedThreadFactory>(" Driver" );
837837 }
838838
839- auto driverExecutor = std::make_unique<folly::CPUThreadPoolExecutor>(
839+ driverExecutor_ = std::make_unique<folly::CPUThreadPoolExecutor>(
840840 numDriverCpuThreads, threadFactory);
841- driverCpuExecutor_ = driverExecutor.get ();
842- driverExecutor_ = std::move (driverExecutor);
841+ driverCpuExecutor_ =
842+ velox::checked_pointer_cast<folly::CPUThreadPoolExecutor>(
843+ driverExecutor_.get ());
843844
844845 const auto numIoThreads = std::max<size_t >(
845846 systemConfig->httpServerNumIoThreadsHwMultiplier () * hwConcurrency, 1 );
@@ -857,8 +858,10 @@ void PrestoServer::initializeThreadPools() {
857858 spillerExecutor_ = std::make_unique<folly::CPUThreadPoolExecutor>(
858859 numSpillerCpuThreads,
859860 std::make_shared<folly::NamedThreadFactory>(" Spiller" ));
861+ spillerCpuExecutor_ =
862+ velox::checked_pointer_cast<folly::CPUThreadPoolExecutor>(
863+ spillerExecutor_.get ());
860864 }
861-
862865 const auto numExchangeHttpClientIoThreads = std::max<size_t >(
863866 systemConfig->exchangeHttpClientNumIoThreadsHwMultiplier () *
864867 std::thread::hardware_concurrency (),
0 commit comments