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

O(n²) on component removal #9207

Closed
2 tasks done
nijel opened this issue May 5, 2023 · 2 comments · Fixed by #9231
Closed
2 tasks done

O(n²) on component removal #9207

nijel opened this issue May 5, 2023 · 2 comments · Fixed by #9231
Assignees
Labels
bug Something is broken.
Milestone

Comments

@nijel
Copy link
Member

nijel commented May 5, 2023

Describe the issue

When removing a bunch of components from a project which has tens of them causes a huge backlog of update_checks tasks because it is called for every component in the project for each component.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Create a project with 100 components.
  2. Remove 10 of them.
  3. Notice there will be 10*100 update_checks tasks queued.
  4. Many of them will consequently fail because they were fired for consequently removed component.

Expected behavior

Small number of tasks caused by massive component removal.

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

@nijel nijel added the bug Something is broken. label May 5, 2023
@nijel nijel added this to the 4.18 milestone May 5, 2023
@weblateorg-sentry-integration
Copy link

Sentry issue: WEBLATE-Q1

@nijel nijel self-assigned this May 12, 2023
nijel added a commit that referenced this issue May 12, 2023
This will allow to better handle repeated triggers here.

Issue #9207
nijel added a commit to nijel/weblate that referenced this issue May 15, 2023
Many of these can be fired in some situations (removing components from
a huge project), so execute only the latest scheduled one.

Fixes WeblateOrg#9207
nijel added a commit to nijel/weblate that referenced this issue May 15, 2023
Many of these can be fired in some situations (removing components from
a huge project), so execute only the latest scheduled one.

Fixes WeblateOrg#9207
nijel added a commit to nijel/weblate that referenced this issue May 15, 2023
Many of these can be fired in some situations (removing components from
a huge project), so execute only the latest scheduled one.

Fixes WeblateOrg#9207
nijel added a commit to nijel/weblate that referenced this issue May 16, 2023
Many of these can be fired in some situations (removing components from
a huge project), so execute only the latest scheduled one.

Fixes WeblateOrg#9207
nijel added a commit that referenced this issue May 16, 2023
Many of these can be fired in some situations (removing components from
a huge project), so execute only the latest scheduled one.

Fixes #9207
@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant