-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[BUG]: fix missing tenant ID in version file #4408
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
codetheweb
commented
Apr 30, 2025
@@ -30,7 +30,7 @@ func (s *collectionDb) DeleteAll() error { | |||
func (s *collectionDb) GetCollectionEntry(collectionID *string, databaseName *string) (*dbmodel.Collection, error) { | |||
var collections []*dbmodel.Collection | |||
query := s.db.Table("collections"). | |||
Select("collections.id, collections.name, collections.database_id, collections.is_deleted, databases.tenant_id, collections.version, collections.version_file_name, collections.root_collection_id"). | |||
Select("collections.id, collections.name, collections.database_id, collections.is_deleted, collections.tenant, collections.version, collections.version_file_name, collections.root_collection_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.
my understanding is that this annotation controls what dbmodel.Collection.Tenant
pulls from:
Tenant string `gorm:"tenant"` |
Sicheng-Pan
approved these changes
Apr 30, 2025
Note: need to read tenant id from collections table in order to set the version file path correctly |
a237541
to
9540f00
Compare
Sicheng-Pan
approved these changes
Apr 30, 2025
warpbuild-benchmark-bot bot
added a commit
to WarpBuilds/chroma
that referenced
this pull request
Apr 30, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Upon compaction flush for a collection, the Sysdb creates a version file if one does not exist. To do this, it populates fields in the file using the
GetCollectionEntry
method.However, before this PR, the
GetCollectionEntry
method always returned an empty string for the tenant. This led to the field missing in the version file and version files being saved under the wrong bucket prefix.Test plan
How are these changes tested?
Validated that the tenant ID is now correctly populated by:
tilt up
with version files disabled on Sysdb.Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?
n/a