Bug #13211

The deletion of archival descriptions with a lot of descendants is prone to web server timeouts

Added by José Raddaoui Marín over 2 years ago. Updated about 2 years ago.

Status:VerifiedStart date:11/13/2019
Priority:MediumDue date:
Assignee:Dan Gillean% Done:

0%

Category:Performance / scalability
Target version:Release 2.5.4
Google Code Legacy ID: Tested version:2.5, 2.6
Sponsored:No Requires documentation:

Description

When a full hierarchy of descriptions is deleted from the database it has to be deleted from the bottom to the top to avoid foreign key constraint errors related to the parent-son relations. This is taking too much time in large datasets causing web server timeouts in some cases (it depends on the amount of descendants and the position in the entire archival descriptions tree). Additionally, when the timeout occurs, the process keeps running causing issues in the MySQL server.


Related issues

Related to Access to Memory (AtoM) - Task #13224: Improve hierarchy management queries Verified 12/09/2019
Related to Access to Memory (AtoM) - Task #13239: Improve deletion of nested set hierarchies (specially terms) Verified 01/13/2020
Related to Access to Memory (AtoM) - Task #10306: Improve foreign key declarations in database schema Verified 09/14/2016

History

#1 Updated by José Raddaoui Marín over 2 years ago

  • Status changed from In progress to Code Review

This is ready for code review in https://github.com/artefactual/atom/pull/1000.

As you can see I broke the PR and it's already merged so I'll address the feedback and merge any changes in different PRs if needed.

#2 Updated by José Raddaoui Marín over 2 years ago

  • Assignee changed from José Raddaoui Marín to David Juhasz

#3 Updated by José Raddaoui Marín over 2 years ago

  • Status changed from Code Review to QA/Review
  • Assignee changed from David Juhasz to Dan Gillean

#4 Updated by José Raddaoui Marín over 2 years ago

  • Related to Task #13224: Improve hierarchy management queries added

#5 Updated by José Raddaoui Marín over 2 years ago

  • Related to Task #13239: Improve deletion of nested set hierarchies (specially terms) added

#6 Updated by Dan Gillean about 2 years ago

  • Target version changed from Release 2.6.0 to Release 2.5.4

#7 Updated by José Raddaoui Marín about 2 years ago

See notes about parent_id and ON DELETE CASCADE in description of #10306 for further improvements. We could use that ticket or #13239 to continue the work in following releases and use this one for 2.5.4.

#8 Updated by José Raddaoui Marín about 2 years ago

  • Related to Task #10306: Improve foreign key declarations in database schema added

#9 Updated by Dan Gillean about 2 years ago

  • Status changed from QA/Review to Verified

Also available in: Atom PDF