Bug #10272

"Item was already deleted" sometimes occurs when using digital object URIs with --update on import

Added by Mike Gale almost 4 years ago. Updated over 3 years ago.

Status:VerifiedStart date:09/05/2016
Priority:MediumDue date:
Assignee:Dan Gillean% Done:

0%

Category:Import/Export
Target version:Release 2.4.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

To reproduce:
1. Use CSVs in #9775 to import repeatedly with --update='match-and-update'
2. Sometimes an error occurs "item was already deleted"

This appears to be an issue of ->delete() not finishing its business and actually removing the digital object from an information object's ->digitalObjects array before we call the info object's save() subsequently (so it tries to save a digital object that's "already been deleted").

History

#2 Updated by Mike Gale almost 4 years ago

  • Status changed from New to Code Review
  • Assignee changed from Mike Gale to José Raddaoui Marín

Hi Radda, can you check https://github.com/artefactual/atom/pull/430 for me please. I tried really hard to figure out why this issue was happening but I spent too much time on it already. Hopefully my workaround is good enough. I'm hoping maybe you or Jesús have any ideas on what the underlying cause of this issue was, but at any rate, this fixes it :P

#3 Updated by José Raddaoui Marín almost 4 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from José Raddaoui Marín to Mike Gale

#4 Updated by Mike Gale almost 4 years ago

  • Status changed from Feedback to Code Review
  • Assignee changed from Mike Gale to José Raddaoui Marín

I tried to add it into digital object delete() as per your suggestion, please let me know if this is OK.
https://github.com/artefactual/atom/pull/430

#5 Updated by José Raddaoui Marín almost 4 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from José Raddaoui Marín to Mike Gale

I've added a small comment to the PR. If Sevein doesn't know a better solution I think it's okay.

#6 Updated by Mike Gale almost 4 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Mike Gale to Dan Gillean

If you use 2nd-update.csv in the related ticket + run csv:import with --update='match-and-update' a few times, you can confirm this issue is gone. At least, I consistently got this error after running that command 2-3x.

(merged solution to qa/2.4.x)

#7 Updated by Dan Gillean over 3 years ago

  • Status changed from QA/Review to Verified
  • Target version set to Release 2.4.0

Also available in: Atom PDF