Closed doulikecookiedough closed 1 week ago
To make this process transparent, we will refactor tagObject
by having it only synchronize the tagging process. When it is safe to proceed with tagging, we will call a new protected method: storeHashStoreRefs
. This method will absorb the main functionality of tagObject
.
Should any exception be raised, tagObject
will have a new protected method to call: unTagObject
. This will revert the process (remove the pid
& then attempt to delete the cid refs file
, and then delete the pid refs file
).
So tagObject
itself will handle any clean-up work related to refs files for an unexpected exception raised, before re-raising it to the client.
This has been completed via Feature-83: tagObject
Refactor
If
tagObject
fails to tag apid
with acid
, we should try to remove orphaned files and revert any changes. Currently, only specific scenarios of whether reference files exist or not are accounted for.