@@ -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 (),
@@ -854,9 +854,11 @@ void PrestoServer::initializeThreadPools() {
854854 const auto numSpillerCpuThreads = std::max<size_t >(
855855 systemConfig->spillerNumCpuThreadsHwMultiplier () * hwConcurrency, 0 );
856856 if (numSpillerCpuThreads > 0 ) {
857- spillerExecutor_ = std::make_unique<folly::CPUThreadPoolExecutor>(
857+ auto spillerExecutor = std::make_unique<folly::CPUThreadPoolExecutor>(
858858 numSpillerCpuThreads,
859859 std::make_shared<folly::NamedThreadFactory>(" Spiller" ));
860+ spillerCpuExecutor_ = spillerExecutor.get ();
861+ spillerExecutor_ = std::move (spillerExecutor);
860862 }
861863
862864 const auto numExchangeHttpClientIoThreads = std::max<size_t >(
@@ -1793,7 +1795,7 @@ void PrestoServer::registerDynamicFunctions() {
17931795
17941796void PrestoServer::createTaskManager () {
17951797 taskManager_ = std::make_unique<TaskManager>(
1796- driverExecutor_. get () , httpSrvCpuExecutor_.get (), spillerExecutor_. get () );
1798+ driverCpuExecutor_ , httpSrvCpuExecutor_.get (), spillerCpuExecutor_ );
17971799}
17981800
17991801void PrestoServer::reportNodeStats (proxygen::ResponseHandler* downstream) {
0 commit comments