Task #13239

Improve deletion of nested set hierarchies (specially terms)

Added by José Raddaoui Marín about 1 month ago.

Status:NewStart date:01/13/2020
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Data model / ORM
Target version:-
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

Similar to the fix added for archival descriptions on #13211, we could avoid several nested set updates while deleting a resource with multiple descendants. For example, on term deletions:

https://github.com/artefactual/atom/blob/stable/2.5.x/apps/qubit/modules/term/actions/deleteAction.class.php#L48-L54

Ideally, we would add the fix from #13211 to the model objects builder for objects with a nested set implementation. In addition to that, we should run those deletions inside a database transaction, which is already the case in a web request but not in places like the delete description task:

https://github.com/artefactual/atom/blob/stable/2.5.x/lib/task/tools/deleteDescriptionTask.class.php#L145


Related issues

Related to Access to Memory (AtoM) - Bug #13211: The deletion of archival descriptions with a lot of desce... QA/Review 11/13/2019
Related to Access to Memory (AtoM) - Task #13224: Improve hierarchy management queries Code Review 12/09/2019

History

#1 Updated by José Raddaoui Marín about 1 month ago

  • Related to Bug #13211: The deletion of archival descriptions with a lot of descendants is prone to web server timeouts added

#2 Updated by José Raddaoui Marín about 1 month ago

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

Also available in: Atom PDF