Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SortableListener postRemove event crashes large DB if more entities were removed -- (ORM adapter) #2270

Open
forgie1 opened this issue Oct 21, 2021 · 3 comments
Labels
Bug A confirmed bug in Extensions that needs fixing. Sortable Still Relevant Mark PRs that might've been auto-closed that are still relevant.

Comments

@forgie1
Copy link

forgie1 commented Oct 21, 2021

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.

@forgie1
Copy link
Author

forgie1 commented Oct 21, 2021

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.

@phansys phansys added Sortable Bug A confirmed bug in Extensions that needs fixing. labels Nov 6, 2021
@github-actions
Copy link

github-actions bot commented May 5, 2022

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.

@github-actions github-actions bot added the Stale label May 5, 2022
@github-actions github-actions bot closed this as completed Jun 4, 2022
@forgie1
Copy link
Author

forgie1 commented Jun 4, 2022

closed but not solved :(

@franmomu franmomu reopened this Jun 4, 2022
@franmomu franmomu added Still Relevant Mark PRs that might've been auto-closed that are still relevant. and removed Stale labels Jun 4, 2022
@forgie1 forgie1 changed the title SortableListener postRemove event crashes large DB (ORM adapter) SortableListener postRemove event crashes large DB if more entities were removed -- (ORM adapter) Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A confirmed bug in Extensions that needs fixing. Sortable Still Relevant Mark PRs that might've been auto-closed that are still relevant.
Projects
None yet
Development

No branches or pull requests

3 participants