Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] GC deletion mode. #3946

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion rust/garbage_collector/src/garbage_collector_orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

use std::fmt::{Debug, Formatter};

use crate::types::CleanupMode;
use async_trait::async_trait;
use chroma_error::{ChromaError, ErrorCodes};
use chroma_storage::Storage;
Expand Down Expand Up @@ -448,7 +449,12 @@ impl Handler<TaskResult<ComputeUnusedBetweenVersionsOutput, ComputeUnusedBetween
};

let delete_task = wrap(
Box::new(DeleteUnusedFilesOperator::new(self.storage.clone(), true)), // Using soft delete mode
// TODO(rohit): The CleanupMode needs to be changed based on the config.
Box::new(DeleteUnusedFilesOperator::new(
self.storage.clone(),
CleanupMode::Rename,
self.collection_id.to_string(),
)),
DeleteUnusedFilesInput {
unused_s3_files: output.unused_s3_files.clone(),
epoch_id: output.epoch_id,
Expand Down
1 change: 1 addition & 0 deletions rust/garbage_collector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub mod garbage_collector_orchestrator;
pub mod helper;
mod opentelemetry_config;
pub mod operators;
pub mod types;

const CONFIG_PATH_ENV_VAR: &str = "CONFIG_PATH";

Expand Down
Loading
Loading