Improve deletion of nested set hierarchies (specially terms)
|Category:||Data model / ORM|
|Target version:||Release 2.6.0|
|Google Code Legacy ID:||Tested version:|
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:
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:
#5 Updated by José Raddaoui Marín almost 2 years ago
- Status changed from New to Code Review
- Assignee set to Steve Breker
- Target version set to Release 2.6.0
Ready for code review in https://github.com/artefactual/atom/pull/1102.
In the end, to trust the ON DELETE action for this deletions we would need to change a lot of the deletion code (related resources updates, assets removal) and the benefits of using deleting by query in ES are not that high considering we use batch requests and that they are quite fast.
So this changes only normalize de deletion of terms and information objects, following the fix implemented in #13211.
#6 Updated by José Raddaoui Marín almost 2 years ago
To test this changes, we should check the deletion of terms and descriptions with descendants, from the GUI and also using the delete description task. Additionally, the term's delete page will only show a few descendants now (it was showing links for all before), like the description page does, based on the items per page setting value.