kbase / blobstore

Simple S3 backed file storage.
MIT License
0 stars 3 forks source link

Implement fast/shallow node copy #136

Open MrCreosote opened 2 years ago

MrCreosote commented 2 years ago

Currently copying a node entails copying the S3 file and then copying the Mongo node. This deep copy occurs because if two nodes point to the same S3 file and one of them is deleted, the delete operation will delete the S3 file and leave the remaining node with a dangling reference.

To allow for shallow copies, which should take milliseconds as opposed to potentially hours:

On a delete request:

On a node copy, create a new node pointing to the same S3 file rather than copying the file.