Bug #234
closedmetacat accession number handling
0%
Description
Metacat currently generates an accession number if one is not provided by the
client on insert. We decided last March that this behavior should not be
allowed. Thus, metacat needs to be changes so that it requires a valid
accession number on insert -- should fail if no accession number is provided, or
if the accession number is not unique, or if the revision portion of the
accession number is not "1". Thus, "mbj.145.1" would be valid for an insert
action, but "knb.189.3" would not be (because the revision is not 1).
On update actions, we need to require an accession number and ensure that the
new accession number has a revision number that is one greater than the current
accession number revision. This will be some indication that the document being
updated "came from" the most recent version. For example, if someone downloads
"mbj.1.1" and tries to update it with new accession number "mbj.1.2", it would
succeed. If they don't provide a new accession number, it would fail. If they
download "knb.1.3", someone else updates it first to create "knb.1.4", and the
original user tries to update with "knb.1.4", it would fail, telling them to get
the most recent revision and try again. This is basically a simple mechanism
for asynchronous update conflicts.