-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH]: perform collection hard deletes from garbage collector #4605
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: feat-gc-hard-delete-collection-sysdb
Are you sure you want to change the base?
[ENH]: perform collection hard deletes from garbage collector #4605
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
5b21248
to
5b6a52b
Compare
f545524
to
822e31d
Compare
5b6a52b
to
65e13b1
Compare
822e31d
to
afe5084
Compare
65e13b1
to
9ab64f5
Compare
afe5084
to
9aed3e4
Compare
8aff535
to
d78d710
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.
changes in this file provide a little more debugging info + a new defensive check
9aed3e4
to
ca845a3
Compare
720af86
to
c815632
Compare
Garbage Collector Now Transitions & Finalizes Hard Deletes of Soft-Deleted Collections This PR refactors and extends the garbage collection system to fully support and perform hard deletion of collections once they have been soft deleted and all eligible versions are pruned. The hard-delete process is now handled within the garbage collector, with systematic checks to ensure no dependent forked collections remain alive before escalation from soft to hard delete, and includes batch APIs to check and finalize deletion status through sysdb. Comprehensive changes span orchestrators, computation operators, sysdb, test harnesses, and the supporting types. Key Changes: Affected Areas: Potential Impact: Functionality: Introduces new behavior: soft-deleted collections are only fully (hard) deleted by GC after all forked descendants are also soft-deleted; ensures safe pruning and data integrity. Performance: Minimal overhead added by extra sysdb checks; batch queries optimize status retrieval. No major regressions expected. Security: No sensitive security changes. Preserves integrity by ensuring hard deletes only when structurally safe. Scalability: Batch operations and targeted traversal optimize handling for large numbers of collections/forks. Safe for scale. Review Focus: Testing Needed• Run and inspect all proptests (now covering fork and soft/hard delete edge cases). Code Quality Assessmentrust/garbage_collector/src/garbage_collector_orchestrator_v2.rs: Expanded state, control flow, and error handling; separation of soft/hard delete stages is clear. rust/garbage_collector/src/operators/compute_versions_to_delete_from_graph.rs: Correct separation of logic for normal and soft-deleted collections; new tests clear. rust/sysdb/src/sysdb.rs: Well-organized batch and finalize APIs; explicit errors and branching for mode. rust/sysdb/src/test_sysdb.rs: Test helpers now properly simulate new logic. rust/types/src/api_types.rs: New enums for batch status errors, well-integrated. rust/garbage_collector/src/construct_version_graph_orchestrator.rs: Defensive, additional error cases; clear. rust/garbage_collector/tests/proptest_helpers/garbage_collector_reference.rs: Significant refactor and logic addition; explicit, well-annotated. Edge-cases covered. Best PracticesError Handling: Test Coverage: API Design: Potential Issues• If forks are created or deleted rapidly in pathological topologies, timing bugs or race conditions could occur in hard delete escalation (should be caught by proptests). This summary was automatically generated by @propel-code-bot |
ca845a3
to
ccc9b82
Compare
c815632
to
d56d085
Compare
ccc9b82
to
4dcc3a4
Compare
d56d085
to
ab68c6d
Compare
4dcc3a4
to
f2adff1
Compare
ab68c6d
to
3c756a0
Compare
f2adff1
to
660013f
Compare
3c756a0
to
7e8bfb4
Compare
660013f
to
b10b4b0
Compare
7e8bfb4
to
59c1d1c
Compare
b10b4b0
to
77a9d62
Compare
59c1d1c
to
738703d
Compare
716f29a
to
9356e10
Compare
ed65c55
to
230d5ac
Compare
9356e10
to
8253c18
Compare
230d5ac
to
cf6858c
Compare
Description of changes
This updates the garbage collector to transition soft deleted collections to hard deleted when eligible.
Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustI updated the proptest with a new transition for deleting collections.
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