Skip to content

[ENH]: garbage collector v2 orchestrator (supports forking) #4468

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

Draft
wants to merge 1 commit into
base: feat-gc-list-files-at-version-operator
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions go/pkg/sysdb/coordinator/table_catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ func (tc *Catalog) createSegmentImpl(txCtx context.Context, createSegment *model
Type: createSegment.Type,
Scope: createSegment.Scope,
Ts: ts,
FilePaths: createSegment.FilePaths,
}
err := tc.metaDomain.SegmentDb(txCtx).Insert(dbSegment)
if err != nil {
Expand Down
9 changes: 5 additions & 4 deletions rust/blockstore/src/test_utils/sparse_index_test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use uuid::Uuid;
/// * `Result<Uuid, Box<dyn ChromaError>>` - The UUID of the created sparse index file
pub async fn create_test_sparse_index(
storage: &Storage,
root_id: Uuid,
block_ids: Vec<Uuid>,
prefix: Option<String>,
) -> Result<Uuid, Box<dyn ChromaError>> {
Expand All @@ -43,7 +44,6 @@ pub async fn create_test_sparse_index(
sparse_index.set_count(block_ids[0], 1)?;

// Create and save the sparse index file
let root_id = Uuid::new_v4();
let root_writer = RootWriter::new(Version::V1_1, root_id, sparse_index);
let root_manager = RootManager::new(storage.clone(), Box::new(NopCache));
root_manager.flush::<&str>(&root_writer).await?;
Expand Down Expand Up @@ -87,7 +87,8 @@ mod tests {
let storage = Storage::Local(LocalStorage::new(temp_dir.path().to_str().unwrap()));

let block_ids = vec![Uuid::new_v4(), Uuid::new_v4(), Uuid::new_v4()];
let result = create_test_sparse_index(&storage, block_ids.clone(), None).await;
let result =
create_test_sparse_index(&storage, Uuid::new_v4(), block_ids.clone(), None).await;
assert!(result.is_ok());

// Verify the sparse index was created by trying to read it
Expand All @@ -107,7 +108,7 @@ mod tests {
let temp_dir = TempDir::new().unwrap();
let storage = Storage::Local(LocalStorage::new(temp_dir.path().to_str().unwrap()));

let result = create_test_sparse_index(&storage, vec![], None).await;
let result = create_test_sparse_index(&storage, Uuid::new_v4(), vec![], None).await;
assert!(matches!(
result,
Err(e) if e.to_string().contains("Cannot create sparse index with empty block IDs")
Expand All @@ -121,7 +122,7 @@ mod tests {

let block_ids = vec![Uuid::new_v4(), Uuid::new_v4()];
let prefix = Some("custom".to_string());
let result = create_test_sparse_index(&storage, block_ids, prefix).await;
let result = create_test_sparse_index(&storage, Uuid::new_v4(), block_ids, prefix).await;
assert!(result.is_ok());
}
}
1 change: 1 addition & 0 deletions rust/garbage_collector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ tokio-test = "0.4"
rand = { workspace = true }
itertools = { workspace = true }
tracing-test = { version = "0.2.5" }
tracing-subscriber = { workspace = true }
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ impl Handler<TaskResult<ComputeUnusedFilesOutput, ComputeUnusedFilesError>>
)),
DeleteUnusedFilesInput {
unused_s3_files: output.unused_block_ids.into_iter().collect(),
epoch_id: 0,
hnsw_prefixes_for_deletion: output.unused_hnsw_prefixes,
},
ctx.receiver(),
Expand Down
Loading
Loading