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

Make sure FlushRepoTask deletes all the entities related to Repository #1134

Closed
4 tasks
Tracked by #1127
giovanni-guidini opened this issue Feb 5, 2024 · 1 comment
Closed
4 tasks
Tracked by #1127

Comments

@giovanni-guidini
Copy link

After reviewing the FlushRepoTask it's clear that some objects that should be deleted are not being cleaned up. This task consists of making sure everything is properly deleted.

You'll notice that the task deletes things table by table instead of relying on cascades of the database. This is done to reduce the number of records deleted in each transaction, reducing the total time of the query. We've had issues with queries running too long before, so we prefer to have many queries that run faster.

This task list might not be complete, but includes known objects that need to be deleted within the task. Check the image below (pretty big) for the relationship of different tables that are related to repos.

Objects to add to FlushRepoTask

Preview Give feedback

postgres_ERdiagram

@Swatinem
Copy link

The revamped FlushRepo code (codecov/worker#973) is resolving all relations using django metadata, so does solve this issue.

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

No branches or pull requests

2 participants