Bug #6582
closed
Duplicate key error when submitting the online registry form multiple times simultaneously
Added by Lauren Walker over 10 years ago.
Updated over 10 years ago.
Description
Tomcat log error msg: [ERROR]: DocumentImpl.write - Problem with parsing: EML210SaxHandler.startElement - error with action INSERT : ERROR: duplicate key value violates unique constraint "xml_documents_pk" [edu.ucsb.nceas.metacat.DocumentImpl]
Possible fix: Use UUIDs as the scope of the docid so all docids are unique
- Status changed from New to Resolved
The registry script register-dataset.cgi will now only create one docid at a time before uploading a data or metadata file. This is done by creating and locking a local file while the docid creation process is in progress. Once a new docid is created, it is saved in a separate local file, unlocks the lock, and continues the insert process. The docids are saved in a local file so that another thread running at the same time will be able to create a new docid before the other is inserted into metacat.
I will also be adding the bash script that I used to test this.
Moved this change to the KNB production server on July 31, 2014.
Also available in: Atom
PDF