Skip to content

Commit

Permalink
[native]Change spiller executor to cpu executor
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxmeng committed Nov 5, 2023
1 parent 4199cad commit 8a0da75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ std::shared_ptr<folly::CPUThreadPoolExecutor>& httpProcessingExecutor() {
return executor;
}

std::shared_ptr<folly::IOThreadPoolExecutor> spillExecutor() {
std::shared_ptr<folly::CPUThreadPoolExecutor> spillExecutor() {
const int32_t numSpillThreads = SystemConfig::instance()->numSpillThreads();
if (numSpillThreads <= 0) {
return nullptr;
}
static auto executor = std::make_shared<folly::IOThreadPoolExecutor>(
static auto executor = std::make_shared<folly::CPUThreadPoolExecutor>(
numSpillThreads, std::make_shared<folly::NamedThreadFactory>("Spiller"));
return executor;
}
Expand All @@ -57,7 +57,7 @@ folly::CPUThreadPoolExecutor* httpProcessingExecutorPtr() {
return httpProcessingExecutor().get();
}

folly::IOThreadPoolExecutor* spillExecutorPtr() {
folly::CPUThreadPoolExecutor* spillExecutorPtr() {
return spillExecutor().get();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace facebook::presto {

folly::CPUThreadPoolExecutor* driverCPUExecutor();
folly::CPUThreadPoolExecutor* httpProcessingExecutorPtr();
folly::IOThreadPoolExecutor* spillExecutorPtr();
folly::CPUThreadPoolExecutor* spillExecutorPtr();

class QueryContextCache {
public:
Expand Down

0 comments on commit 8a0da75

Please sign in to comment.