Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Task for automatic garbage collection of unused documents and views (#…
…500) * Return removed document view ids from `prune_document_views` * Introduce "prune" task * Issue "prune" tasks from "reduce" tasks * Only issue dependency tasks in test utils * Don't issue a dependency task when reduced document is deleted * Update all tests * Clippy * More comments in prune task * Correctly process effected child relations of deleted views * Improve comments in prune task * Correct item name * Test helper method for updating documents * Pruning SQL gets a little more epic * Test for recursive pruning * fmt * Tests for "prune" task * Update CHANGELOG * Remove unused method * Improve doc string * Use transaction in prune method * SQL re-use and more comments * Change comments again * Add cascading deletes to operation_fields_v1 and document_views * Add a trigger which purges a documents logs, entries and operations from the database * Add purge method to document store w/ tests * Re-use common sql strings * Refactor prune_document_views() into separate methods * Remove prune_documents_view() method from DocumentStore * Implement pruning logic in task * Rename "prune" task "garbage_collection" * Check if all views for a document have been removed in "garbage_collection" task * fmt + clippy * Add purge_blob method to BlobStore * Use purge_blob in "garbage_collection" task * Don't remove row from `logs` table on purge * Correct method naming * Some comment improvements * Remove unused import * Move add_blob to test utils * Move assert_query method to test utils * Tests for "garbage_collection" task * Change task name to "garbage_collection" * Clippy * Update CHANGELOG entry * Move SQL trigger into purge_document method on the store * Inline all SQL query constant strings * Update CHANGELOG * Add more comments in purge_blob method * Add test for purging updated blob * Clippy * fmt * Improve comments in garbage_collection task
- Loading branch information