Closed rija closed 1 week ago
@rija it's something I noticed while fixing the problem. there is definitely some code that needs to be reworked. On this ticket, no substantial changes on the old code. Given that a new ticket should be assigned, I didn't fix it in this #2017 PR. the different for loop should be avoided because a a delete is triggered for each relation atm (n+1).
I have another PR with deleteAll executing a single SQL delete instead of the foreach.
Fixed in PR #2043
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior The file entry should be removed promptly
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context this behaviour seem to have appeared with the merge of PR #2017 that fixes #2015.
my intuition tells me it's related to Postgresql indexes and the database transaction that wraps the deletion of the associated entries from the file_attributes table and then of the row in the file table.