Project

General

Profile

Bug #6582

Duplicate key error when submitting the online registry form multiple times simultaneously

Added by Lauren Walker over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
registry
Target version:
Start date:
07/23/2014
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:

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

History

#1 Updated by Lauren Walker over 5 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.

#2 Updated by ben leinfelder over 5 years ago

Moved this change to the KNB production server on July 31, 2014.

Also available in: Atom PDF