-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH]: Return database id in get collections call from sysdb #4686
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
base: main
Are you sure you want to change the base?
[ENH]: Return database id in get collections call from sysdb #4686
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Expose Database ID in Collection Metadata from sysdb (GetCollections RPC) This PR extends the sysdb (system database) service and associated codepaths to include the database ID (UUID) in each collection's metadata returned by the get_collections RPC. Changes are made across the protocol buffers, Rust collection types, sysdb implementations, and Go sysdb gRPC translation layers so that the database UUID is available for backend services (not forwarded to the end-user frontend). This will facilitate use cases where operations on collections need to be aware of the associated database UUID (e.g., S3 prefixing for organization in storage). The work introduces the new Key Changes: Affected Areas: This summary was automatically generated by @propel-code-bot |
@@ -163,73 +162,6 @@ impl ChromaGrpcClients { | |||
} | |||
} | |||
|
|||
#[allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was dead code
let collection_metadata: Option<Metadata> = match proto_collection.metadata { | ||
Some(proto_metadata) => match proto_metadata.try_into() { | ||
Ok(metadata) => Some(metadata), | ||
Err(e) => return Err(CollectionConversionError::MetadataValueConversionError(e)), | ||
}, | ||
None => None, | ||
}; | ||
let database_id = DatabaseUuid::from_str(&proto_collection.database_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to handle upgrade scenario such as
- sysdb is on an older version and does not populate this field
- Query/compactor is on a newer version and tries to parse uuid and crashes
Description of changes
Summarize the changes made by this PR.
Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
None