-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor deleteObject
for new requirements
#57
Comments
deleteObject
for new requirements
@mbjones Hoping to get some feedback regarding the following requirement on this issue:
Context: In order to remove all associated metadata files, we need to be able to identify all the metadata namespaces ( If I ignore the tracking of the actual usage of a After discussing with @taojing2002 - we thought that changing the way we store metadata can possibly help address and simplify this issue. Proposal:
Currently, a metadata document is stored at a permanent address that is calculated by getting the sha256 hash of the
May we please get your thoughts here? I don't quite like how long the folder and object name can be, but as of writing this I am unable to come up with any simpler paths. |
@doulikecookiedough Let's discuss during the backend meeting tomorrow please. Overall, I like the idea of storing the metadata for a PID under the hash of that PID -- I never really liked the hash(pid + formatid) because it makes it hard to navigate. that said, I would probably stick to sha256 throughout to simplify coding -- why mix it up over a few characters in a filename? But we can discuss. One other consideration would be whether to include a directory tree to break up the PID hashes so its not a flat structure (given that we've got 45M data files, we'd have 45M PIDs to hash, which is a very large single directory). |
Oh, also... can we please reconsider the method name |
@mbjones Sounds good RE: the naming of the delete all method (leave it as |
Update/Summary:
|
This has been completed via Feature-57: |
Currently, we have two
deleteObject
methods:deleteObject(String pid)
deleteObject(String cid, boolean deleteCid)
These methods need to be refactored to minimize confusion and account for the following requirements below:
cid
(content identifier)pid
(persistent identifier)pid reference file
, thepid
from thecid reference file
and the object itself if there are no more tags in thecid reference file
pid
(persistent identifier)To Do Items:
deleteObject(String pid)
todeleteObject(enum idType, String pid)
idType
ispid
, the method will handle requirement (1)idType
iscid
, the method will handle requirement (2)deleteObjectAll(String pid)
which handles the last requirement (3) (deleting object, relevant reference files and all related sysmeta to the givenpid
)format_id
types utilizedThe text was updated successfully, but these errors were encountered: