This is an automated email from the ASF dual-hosted git repository.
hongze pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 0322f4391f [VL] Use UnboundedBlockingQueue when create threads pool
(#11877)
0322f4391f is described below
commit 0322f4391f8f57a013d56a31f68d6a19743314e3
Author: BInwei Yang <[email protected]>
AuthorDate: Mon Apr 6 19:54:50 2026 -0700
[VL] Use UnboundedBlockingQueue when create threads pool (#11877)
---
cpp/velox/compute/VeloxBackend.cc | 7 +++++--
cpp/velox/compute/VeloxBackend.h | 6 +++---
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/cpp/velox/compute/VeloxBackend.cc
b/cpp/velox/compute/VeloxBackend.cc
index d91c1526b2..bc2104f3f6 100644
--- a/cpp/velox/compute/VeloxBackend.cc
+++ b/cpp/velox/compute/VeloxBackend.cc
@@ -18,7 +18,8 @@
#include "VeloxBackend.h"
-#include <folly/executors/IOThreadPoolExecutor.h>
+#include <folly/executors/CPUThreadPoolExecutor.h>
+#include <folly/executors/task_queue/UnboundedBlockingQueue.h>
#include "operators/functions/RegistrationAllFunctions.h"
#include "operators/plannodes/RowVectorStream.h"
@@ -314,7 +315,9 @@ void VeloxBackend::initConnector(const
std::shared_ptr<velox::config::ConfigBase
ioThreads >= 0,
kVeloxIOThreads + " was set to negative number " +
std::to_string(ioThreads) + ", this should not happen.");
if (ioThreads > 0) {
- ioExecutor_ = std::make_unique<folly::CPUThreadPoolExecutor>(ioThreads);
+ ioExecutor_ = std::make_unique<folly::CPUThreadPoolExecutor>(
+ ioThreads,
+
std::make_unique<folly::UnboundedBlockingQueue<folly::CPUThreadPoolExecutor::CPUTask>>());
}
velox::connector::registerConnector(
std::make_shared<velox::connector::hive::HiveConnector>(kHiveConnectorId,
hiveConf, ioExecutor_.get()));
diff --git a/cpp/velox/compute/VeloxBackend.h b/cpp/velox/compute/VeloxBackend.h
index 9176b36977..c6fbf965cf 100644
--- a/cpp/velox/compute/VeloxBackend.h
+++ b/cpp/velox/compute/VeloxBackend.h
@@ -21,7 +21,7 @@
#include <boost/lexical_cast.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
-#include <folly/executors/IOThreadPoolExecutor.h>
+#include <folly/executors/ThreadPoolExecutor.h>
#include <filesystem>
#include "velox/common/caching/AsyncDataCache.h"
@@ -89,8 +89,8 @@ class VeloxBackend {
// Instance of AsyncDataCache used for all large allocations.
std::shared_ptr<facebook::velox::cache::AsyncDataCache> asyncDataCache_;
- std::unique_ptr<folly::IOThreadPoolExecutor> ssdCacheExecutor_;
- std::unique_ptr<folly::CPUThreadPoolExecutor> ioExecutor_;
+ std::unique_ptr<folly::Executor> ssdCacheExecutor_;
+ std::unique_ptr<folly::Executor> ioExecutor_;
std::shared_ptr<facebook::velox::memory::MmapAllocator> cacheAllocator_;
std::string cachePathPrefix_;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]