Error: "Duplicate entry 'public:/MODS ..." in "drupal_write_record()"

69 views
Skip to first unread message

Ernie Gillis

unread,
Sep 29, 2015, 4:55:40 PM9/29/15
to islandora
Hi everyone!
I started to do batch ingesting of zipped audio files. I hadn't tried before, or it's been a long time if I had done it in the past.

Anyway! In trying to ingest audio files as a zip, I get these errors:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'public://MODS record_9.xml' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 659 [:db_insert_placeholder_1] => MODS record_9.xml [:db_insert_placeholder_2] => public://MODS record_9.xml [:db_insert_placeholder_3] => application/xml [:db_insert_placeholder_4] => 169 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1443559522 ) in drupal_write_record() (line 7316 of /var/www/html/archives-prod/includes/common.inc).

Anyone have any thoughts?
Thanks!!!
Ernie

Amanda Lehman

unread,
Sep 30, 2015, 10:23:15 AM9/30/15
to islandora
Hi Ernie,

I can't find the thread or tickets, but that error looks familiar to me.  I believe that we fixed it by deleting all of the old batch sets out of the queue (/admin/reports/islandora_batch_sets/<setNumber>/delete).

It was some issue with temp files and the file_managed table, but I don't think we ever specifically learned what, so please share your findings!

Good luck.

Amanda

Phil Redmon

unread,
Sep 30, 2015, 11:27:14 AM9/30/15
to islandora
We ran into this issue in the past [1]. Amanda is right that deleting the batch sets out of the queue should fix it. I'm pretty sure that deleting those sets will set the file's status from 1 to 0 in the table, and then cron will clean them up the next time it runs.


--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at http://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/95ef5979-862d-4357-af77-5e6f4acd8c85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages