-
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 Performs and Finalizes Collection Hard Deletes This PR reworks the garbage collection pipeline to transition eligible soft-deleted collections to hard-deletion from within the garbage collector, rather than relying on side effects elsewhere. The change spans the garbage collector's orchestrator, its operators, system database abstraction, test suites, and API error types, introducing a new batch interface for querying soft delete status, wiring through relevant status checks, and implementing the full hard delete logic when conditions are met (e.g., no live forks). Defensive checks and additional test coverage for fork scenarios are added to ensure correctness. Key Changes: Affected Areas: Potential Impact: Functionality: Enables fully-automated, stateful transition from soft-deletion to true ('hard') deletion of collections only when all fork-children are deleted. Reduces possibility for orphaned data and greatly clarifies deletion flow. Performance: Batch status queries for soft delete state should scale well, avoiding N calls. Deletion up to O(number of collections) hard deletes may marginally increase load during GC tasks. Security: No negative impact; possibly positive in ensuring prompt, correct, final deletion for user data. Scalability: Batching and explicit transition handling should enable robust handling even in large forked-collection graphs. Review Focus: Testing Needed• Run the full test suite, especially all proptests in Code Quality Assessmentrust/garbage_collector/tests/proptest_helpers/garbage_collector_under_test.rs: Adapts to the new logic; validation and check_invariant logic improved to cover all status transitions. rust/garbage_collector/src/garbage_collector_orchestrator_v2.rs: Clear organization, correct async/await discipline, explicit error propagation, effective defensive checks. rust/garbage_collector/src/operators/compute_versions_to_delete_from_graph.rs: Improved logic for status filtering; code is thoroughly tested via added and updated property-based tests. rust/sysdb/src/sysdb.rs: Well-structured, new API introduces minimal disruption, maintainable extension. rust/garbage_collector/tests/proptest_helpers/garbage_collector_reference.rs: Complex but clear; new status model brings explicitness. Best PracticesError Handling: Test Coverage: Modularity: Potential Issues• Edge case: If sysdb or GC crashes mid-hard-delete, double-deletion should be idempotent but should be validated. 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
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