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

feat(database): Remove entities orphaned with removing ort run #1937

Conversation

kamil-bielecki-bosch
Copy link

When archive scans are removed from database, some of orphaned entities stays in database, just occupying space, and deteriorating performance. To prevent this, obsolete (orphaned) records are deleted.

@kamil-bielecki-bosch kamil-bielecki-bosch force-pushed the delete-orphaned-entites-from-db branch 3 times, most recently from b475dc4 to b405b6b Compare February 3, 2025 12:52
@kamil-bielecki-bosch kamil-bielecki-bosch force-pushed the delete-orphaned-entites-from-db branch 2 times, most recently from 161afb7 to 7d7b01a Compare February 4, 2025 14:29
@kamil-bielecki-bosch kamil-bielecki-bosch force-pushed the delete-orphaned-entites-from-db branch 2 times, most recently from 351a29e to ac881eb Compare February 6, 2025 10:41
@kamil-bielecki-bosch kamil-bielecki-bosch force-pushed the delete-orphaned-entites-from-db branch 2 times, most recently from 6f6e5ed to bcbf672 Compare February 7, 2025 14:42
Copy link
Contributor

@oheger-bosch oheger-bosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor nits; otherwise looks good to me.

Do you have any estimate how long the single DELETE statements will take for their execution?

During deletion of old / outdated ORT runs some of child database
entities were left in DB. To prevent this situation, that leads to
database performance issues, orphaned records are deleted.
Deleted record types:
- Packages
- Projects
- Authors
- DeclaredLicenses
- Identifiers
- VCSInfo
- RemoteArtifacts

Signed-off-by: Kamil Bielecki <[email protected]>
@oheger-bosch oheger-bosch added this pull request to the merge queue Feb 7, 2025
Merged via the queue into eclipse-apoapsis:main with commit bbd5170 Feb 7, 2025
26 of 27 checks passed
@oheger-bosch oheger-bosch deleted the delete-orphaned-entites-from-db branch February 7, 2025 15:51
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

Successfully merging this pull request may close these issues.

2 participants