Closed sandreae closed 1 year ago
This is actually reflected in the current behaviour. If a document receives a DELETE operation, the materializer reduces it and issues a garbage_collection
task. Any unused views will be pruned, if this removes all relations to blob_v1
document, then it is purged from the node. Rather than "cascading deletes" this is actually the behaviour we want.
There's even a test to prove it: https://github.com/p2panda/aquadoggo/blob/45b70e19c0648d1dc8a1ba9917859cf876842b0f/aquadoggo/src/materializer/tasks/garbage_collection.rs#L431-L504
So I am closing this issue :+1:
This would mean changing the logic in the
garbage_collection
task to purge blobs when a document which relates to them is deleted, if no other documents relate to them as well.