-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
make collection_id primary key for segment, fix system tests #1731
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
// Update collection to new value | ||
segment.CollectionID = sampleCollections[1].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.
Why comment these tests? These tests are ported from the python system test.
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.
I don't see why we need to set collection id to null or modify the collection id for a segment. And it is not possible to do it because collection_id is now primary key of segment
@@ -165,20 +165,23 @@ func generateSegmentUpdatesWithoutID(in *dbmodel.UpdateSegment) map[string]inter | |||
} | |||
} | |||
|
|||
if in.ResetCollection { |
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.
Why comment out this 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.
I don't see why we need to set collection id to null. And it is not possible to do it because collection_id is now primary key of segment
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.
Discussed with @weiligu offline. Here are the follow ups:
- Recommend to add comments on the trade off between primary key collection_id + id and secondary index on collection_id.
- File an issue in github on the error handling for unique constraint violation.
LGTM after addressing the follow ups.
be6ca0b
to
a3d9519
Compare
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
|
…core#1731) ## Description of changes - collection id should be primary key of segment table, for getSegments performance (there will be a follow up on fixing get Segment since we should push down collection_id) - https://linear.app/trychroma/issue/CHR-324/segment-table-should-have-collection-id-as-primary-key - fixing tests broken by chroma-core@93194c8 ## Test plan *How are these changes tested?* - [x] passing existing tests
Description of changes
Test plan
How are these changes tested?