-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH]: soft delete databases, add FinishDatabaseDeletion
gRPC method to hard delete databases
#4627
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
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
738703d
to
af4051e
Compare
b099250
to
c84c9a6
Compare
af4051e
to
ed65c55
Compare
c84c9a6
to
add6683
Compare
ed65c55
to
230d5ac
Compare
add6683
to
42b9bff
Compare
230d5ac
to
cf6858c
Compare
156ccde
to
0ee676b
Compare
FinishDatabaseDeletion
gRPC method to hard delete databases
0ee676b
to
6ff85b5
Compare
return nil | ||
}) | ||
} | ||
|
||
func (tc *Catalog) GetAllDatabases(ctx context.Context, ts types.Timestamp) ([]*model.Database, error) { |
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 method was never used
Implement Soft Delete for Databases with Hard Delete via New gRPC Method This PR transitions database deletion in the system to a soft delete model, where databases are marked as deleted but remain in storage. A new gRPC method Key Changes: Affected Areas: Potential Impact: Functionality: All client- and internal-facing database deletions become soft deletes; actual data persists until explicitly purged by hard delete. Deletion visibility (list/lookup) is changed: soft-deleted DBs become invisible to normal operations. Performance: Negligible change under normal operation; possible minor overhead in list/get queries due to filtering. Hard deletion operates in batches to avoid transaction limits. Security: Soft deleted databases remain recoverable and might be accessible via manual DB manipulation; eventual hard delete cleans them up as expected. Scalability: Batch-oriented hard delete in Review Focus: Testing Needed• Run Code Quality Assessmentgo/pkg/sysdb/coordinator/table_catalog.go: Removed unused methods, updated workflow for soft delete and ensured cascading soft deletes for collections. go/pkg/sysdb/metastore/db/dbmodel/database.go: Interface updated cleanly; model change (is_deleted) matches DB expectations. rust/sysdb/src/sysdb.rs: New trait implementations for hard deletion; error handling for new workflows; consistent with existing structure. rust/types/src/api_types.rs: New error types and trait implementations; maintains idiomatic usage. idl/chromadb/proto/coordinator.proto: Backward-compatible addition of new methods/messages; comments are clear. go/pkg/sysdb/metastore/db/dao/database.go: Refactored and extended with new methods; clear separation between soft and hard delete; code is readable and robust. Best PracticesDatabase Schema: API Design: Test Coverage: Error Handling: Potential Issues• Soft-deleted databases still exist at the storage layer until the hard delete runs; operators should be aware this may affect storage utilization. This summary was automatically generated by @propel-code-bot |
cf6858c
to
4baa298
Compare
6ff85b5
to
c375ff5
Compare
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.
Lgtm
4baa298
to
114728f
Compare
c375ff5
to
5dccc28
Compare
114728f
to
24d7092
Compare
5dccc28
to
4b46394
Compare
24d7092
to
e949e65
Compare
4b46394
to
8bfdba2
Compare
e949e65
to
0da7dfa
Compare
8bfdba2
to
005c7a9
Compare
0da7dfa
to
7de8859
Compare
005c7a9
to
cd722cd
Compare
719d31b
to
cdc60db
Compare
cd722cd
to
30b2b88
Compare
cdc60db
to
e167434
Compare
30b2b88
to
a897895
Compare
e167434
to
3f81298
Compare
89363e7
to
5e896ee
Compare
5e896ee
to
05cf039
Compare
3f81298
to
cdf5e60
Compare
05cf039
to
52d3755
Compare
Merge activity
|
Description of changes
Databases are now always soft deleted instead of being hard deleted. Databases are hard deleted when the new
FinishDatabaseDeletion
method is called (the garbage collector calls this in the next PR).Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustUpdated existing test to cover soft delete behavior.
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