Skip to content

Commit 537c9f2

Browse files
authored
refactor: Switch to global IO runtime for pruning (#10941)
Signed-off-by: Xuanwo <[email protected]>
1 parent 9228473 commit 537c9f2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/query/storages/fuse/src/pruning/fuse_pruner.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use std::collections::HashMap;
1616
use std::sync::Arc;
1717

1818
use common_base::base::tokio::sync::Semaphore;
19+
use common_base::runtime::GlobalIORuntime;
1920
use common_base::runtime::Runtime;
2021
use common_catalog::plan::PushDownInfo;
2122
use common_catalog::table_context::TableContext;
@@ -118,7 +119,7 @@ impl FusePruner {
118119
)?;
119120

120121
// Constraint the degree of parallelism
121-
let max_threads = ctx.get_settings().get_max_threads()? as usize;
122+
// let max_threads = ctx.get_settings().get_max_threads()? as usize;
122123
let max_concurrency = {
123124
let max_io_requests = ctx.get_settings().get_max_storage_io_requests()? as usize;
124125
// Prevent us from miss-configured max_storage_io_requests setting, e.g. 0
@@ -133,17 +134,18 @@ impl FusePruner {
133134
};
134135

135136
// Pruning runtime.
136-
let pruning_runtime = Arc::new(Runtime::with_worker_threads(
137-
max_threads,
138-
Some("pruning-worker".to_owned()),
139-
)?);
137+
// let pruning_runtime = Arc::new(Runtime::with_worker_threads(
138+
// max_threads,
139+
// Some("pruning-worker".to_owned()),
140+
// )?);
140141
let pruning_semaphore = Arc::new(Semaphore::new(max_concurrency));
141142
let pruning_stats = Arc::new(FusePruningStatistics::default());
142143

143144
let pruning_ctx = Arc::new(PruningContext {
144145
ctx: ctx.clone(),
145146
dal,
146-
pruning_runtime,
147+
// TODO: we should switch back to pruning_runtime after we figure out the root cause of hang.
148+
pruning_runtime: GlobalIORuntime::instance(),
147149
pruning_semaphore,
148150
limit_pruner,
149151
range_pruner,

0 commit comments

Comments
 (0)