Skip to content

Commit 3b76d4d

Browse files
authored
[ENH]: wire GC v2 to new cleanup modes & call FinishDatabaseDeletion from garbage collector (#4671)
## Description of changes Changes: - Adds two new cleanup modes, `DryRunV2` and `DeleteV2`. When the default cleanup mode is set to one of these, or when it is set per tenant, the v2 garbage collector orchestrator will be used. Otherwise, the old orchestrator will be used. The default remains the same (the old orchestrator in dry run mode). - Adds a config field to the garbage collector config for the root manager cache config. Has a default. - Calls `FinishDatabaseDeletion` at the end of each GC cycle. This will transition eligible soft deleted databases -> hard deleted databases. I added a test for this. ## Test plan _How are these changes tested?_ - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes _Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs section](https://github.com/chroma-core/chroma/tree/main/docs/docs.trychroma.com)?_ n/a
1 parent 7c38a70 commit 3b76d4d

File tree

7 files changed

+350
-67
lines changed

7 files changed

+350
-67
lines changed

rust/garbage_collector/src/config.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use std::{collections::HashMap, time::Duration};
2-
1+
use chroma_cache::CacheConfig;
32
use chroma_storage::config::StorageConfig;
43
use chroma_system::DispatcherConfig;
54
use figment::providers::{Env, Format, Yaml};
5+
use std::{collections::HashMap, time::Duration};
66

77
use crate::types::CleanupMode;
88

@@ -40,6 +40,8 @@ pub(super) struct GarbageCollectorConfig {
4040
pub my_member_id: String,
4141
#[serde(default = "GarbageCollectorConfig::default_port")]
4242
pub port: u16,
43+
#[serde(default)]
44+
pub root_cache_config: CacheConfig,
4345
}
4446

4547
impl GarbageCollectorConfig {

0 commit comments

Comments
 (0)