Bug #3197
closedData upload incorrectly succeeds on existing docid and revision
0%
Description
When uploading a data file to metacat in the case where the data document identifier already exists, the expected result is for metacat to 'update' the existing docid and revision, so long as the revision number of the new upload is greater than the existing revision number.
If the revision number is not incremented, but rather is identical to the existing revision number for the document, the upload incorrectly succeeds, but returns a upload size of zero bytes. Here's an example:
upload of testdata.1.1:
<success>
<docid>testdata.1.1</docid>
<size>515263</size>
</success>
re-upload a new revision of the data file as testdata.1.2:
<success>
<docid>testdata.1.2</docid>
<size>515263</size>
</success>
Now, mistakenly upload the next revision without incrementing to testdata.1.3:
<success>
<docid>testdata.1.2</docid>
<size>0</size>
</success>
The last upload should not succeed and should return an <error>.