Skip to content

Commit

Permalink
vacuum_temporary_files
Browse files Browse the repository at this point in the history
  • Loading branch information
forsaken628 committed Jan 3, 2025
1 parent 89fca98 commit 0b3a1f6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async fn vacuum_by_duration(
mut limit: usize,
duration: &Option<Duration>,
) -> Result<usize> {
let operator = DataOperator::instance().operator();
let operator = DataOperator::instance().spill_operator();
let start_time = Instant::now();

let expire_time = duration.unwrap_or(DEFAULT_RETAIN_DURATION).as_millis() as i64;
Expand Down Expand Up @@ -187,7 +187,7 @@ async fn vacuum_query_hook(
let metas_f = nodes
.iter()
.map(|i| async move {
let operator = DataOperator::instance().operator();
let operator = DataOperator::instance().spill_operator();
let meta_file_path =
format!("{}/{}_{}{}", temporary_dir, query_id, i, SPILL_META_SUFFIX);
let buffer = operator.read(&meta_file_path).await?;
Expand Down Expand Up @@ -223,7 +223,7 @@ async fn vacuum_by_meta_buffer(
limit: usize,
removed_total: &mut usize,
) -> Result<usize> {
let operator = DataOperator::instance().operator();
let operator = DataOperator::instance().spill_operator();
let start_time = Instant::now();
let meta = meta.to_bytes();
let files: Vec<String> = meta.lines().map(|x| Ok(x?)).collect::<Result<Vec<_>>>()?;
Expand Down Expand Up @@ -265,7 +265,7 @@ async fn vacuum_by_meta(
limit: usize,
removed_total: &mut usize,
) -> Result<usize> {
let operator = DataOperator::instance().operator();
let operator = DataOperator::instance().spill_operator();
let meta: Buffer;
let r = operator.read(meta_file_path).await;
match r {
Expand All @@ -282,7 +282,7 @@ async fn vacuum_by_list_dir(
removed_total: &mut usize,
) -> Result<usize> {
let start_time = Instant::now();
let operator = DataOperator::instance().operator();
let operator = DataOperator::instance().spill_operator();
let mut r = operator.lister_with(dir_path).recursive(true).await?;
let mut batches = vec![];

Expand Down

0 comments on commit 0b3a1f6

Please sign in to comment.