Task #1985
Story #1906: Review, revise, and update architecture documentation
CN method that MN should use for checking if PID exists
100%
Description
UC04 specifies a method on the CN, validatePID(), for the MN to use when checking if a PID exists. This method does not exist, so an existing method or a new method is needed. The method should be inexpensive because it will be called often and the latency of the method gets added to the latency the end user sees when calling MNStorage.create().
Robert initially suggested CNCore.reserveIdentifier() for this use, but it may not be a good fit because the MN does not want to reserve an identifier at that point (while the object is being created) because the PID may already have been reserved by the user and if so, would show up as not available.
Also, implicitly reserving the identifier, and then creating it during MNStorage.create() does not seem to have any benefits other than increasing the workload on CNs. Also, it adds extra work as, if the create() fails for any reason, such as the upload of the science objects from the MN is aborted, the create() must be rolled back, and then the registration of the identifier must be rolled back as well.
So, as an alternative, Robert suggested CNRead.getSystemMetadata(), which seems like a good choice, unless we want to add a light weight method for this specific use.
History
#1 Updated by Dave Vieglais about 13 years ago
- Status changed from New to In Progress
Several methods can be used to report if a PID exists or not.
search with id = PID
listObjects with restriction on PID
getSystemMetadata
reserveIdentifier
reserveIdentifier is currently the best choice as it will test against the current existing as well as reserved list of identifiers.
#2 Updated by Dave Vieglais almost 13 years ago
- Status changed from In Progress to Closed
#3 Updated by Dave Vieglais about 10 years ago
- Target version set to Maintenance Backlog