DoctrineExtensions
DoctrineExtensions copied to clipboard
SortableListener postRemove event crashes large DB if more entities were removed -- (ORM adapter)
If there is DB with:
- hundred of thousands of entities with positions e.g. 0, 1, 2, ..., 658541, -- all in one group
- and e.g. 4.000 random entities are removed in one
EM::flush()
then DB goes down in SortableListener postRemove event. ORM::updatePositions()
was used.
The crash was severe - tested on MariaDB 10.3 also 10.4. On Linux and Windows the same.
DB was even not recoverable after this happen, DB had to be deleted and recreated.
Basically Sortable works also without relocations persisted on postRemove, but this (disabling the postRemove event in SortableListener) is not the best solution to the problem.
I rewrited the script, so only 80 deletitions is flushed at once. And this batches repeat. It didn't help :(
With SortableListener
postRemove
event
on DB crashed completely at the first 80 deletions trying to flush.
With SortableListener
postRemove
event
off DB managed the deletions smoothly.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
closed but not solved :(