Bug #6582
closedDuplicate key error when submitting the online registry form multiple times simultaneously
0%
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
Updated by Lauren Walker over 10 years ago
- 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.
Updated by ben leinfelder over 10 years ago
Moved this change to the KNB production server on July 31, 2014.