Copilot commented on code in PR #13115:
URL: https://github.com/apache/gluten/pull/13115#discussion_r4122370316


##########
cpp/velox/compute/VeloxBackend.cc:
##########
@@ -254,6 +255,10 @@ void VeloxBackend::init(
         std::make_unique<folly::CPUThreadPoolExecutor>(ioThreads, 
folly::CPUThreadPoolExecutor::makeLifoSemQueue());
   }
 
+  const auto hashTableBuildThreads =
+      std::max<int32_t>(1, backendConf_->get<int32_t>(kHashTableBuildThreads, 
numTaskSlotsPerExecutor));
+  hashTableBuildExecutor_ = 
std::make_unique<folly::CPUThreadPoolExecutor>(hashTableBuildThreads);

Review Comment:
   The `<= 0` fallback described for this setting is not implemented: when 
`hashTableBuildThreads` is `0` (or negative), `std::max` produces one thread 
instead of falling back to `numTaskSlotsPerExecutor`. This changes the 
configured/default pool size whenever task slots are greater than one; select 
the configured value only when it is positive, otherwise use `std::max(1, 
numTaskSlotsPerExecutor)`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to