Bug 872001 - Orphaned rendered_kickstart rows are not deleted
Summary: Orphaned rendered_kickstart rows are not deleted
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.9
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: 0.11
Assignee: Dan Callaghan
QA Contact:
URL:
Whiteboard: LogStorage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-31 23:42 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-17 04:34:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2012-10-31 23:42:15 UTC
When a recipe is deleted we should also delete the rendered_kickstart row it was referring to. This will help prevent the rendered_kickstart table from growing so rapidly.

It might be nice if we could return 410 Gone instead of 404 Not Found for kickstarts which have been deleted, in case somebody comes across an old kickstart URL. I'm not sure if there's any efficient way to do that though.

Something else to consider: beaker-transfer could move the kickstarts from the database to the archive server, to help keep the size of the rendered_kickstart table down. (Need to set rendered_kickstart.kickstart to NULL and rendered_kickstart.url to point to the new location on the archive server.)

Comment 2 Raymond Mancy 2012-11-27 04:18:47 UTC
So perhaps just removing them when we deleting a recipe would be the easiest solution. Can't think of why we would need them around beyond the life of a recipe, and these ones are a decent chunk of the total size.

Comment 3 Dan Callaghan 2012-11-28 06:54:55 UTC
On Gerrit: http://gerrit.beaker-project.org/1521

Comment 7 Raymond Mancy 2013-01-03 07:53:16 UTC
mysql> SELECT COUNT(*) AS non_nulled_ks_ids FROM job INNER JOIN recipe_set ON recipe_set.job_id = job.id INNER JOIN recipe ON recipe.recipe_set_id = recipe_set.id AND recipe.rendered_kickstart_id IS NOT NULL WHERE job.deleted IS NOT NULL;
+-------------------+
| non_nulled_ks_ids |
+-------------------+
|                 0 |
+-------------------+
1 row in set (0.01 sec)

Comment 8 Dan Callaghan 2013-01-17 04:34:10 UTC
Beaker 0.11.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.