Bug 1322700 - delete recipe_task_result rows for deleted jobs
Summary: delete recipe_task_result rows for deleted jobs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: 22
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: 23.0
Assignee: matt jia
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 1337790
TreeView+ depends on / blocked
 
Reported: 2016-03-31 07:34 UTC by Dan Callaghan
Modified: 2016-07-07 23:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1337790 (view as bug list)
Environment:
Last Closed: 2016-07-07 23:12:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2016-03-31 07:34:52 UTC
Currently when a job is deleted we remove all the logs from disk, and also remove the corresponding log_* rows from the database.

We should also delete the recipe_task_result rows for the deleted job. That table is by far our largest, which means it is always the most expensive one to ALTER TABLE. Anything we can do to reduce its size will be useful.

(Slightly related to bug 1314271 which is about showing something sensible in the UI when looking at a deleted job or recipe.)

Comment 1 Dan Callaghan 2016-04-12 06:03:00 UTC
We may need to do this for 23.0... The patch for Installing status <http://gerrit.beaker-project.org/4797> includes an ALTER TABLE recipe_task_result, which is basically a worst case scenario for our upgrade. I think the last one of these we had took 8 hours. We are up to > 37 million rows in that table now.

Comment 2 Dan Callaghan 2016-04-12 07:24:27 UTC
(In reply to Dan Callaghan from comment #1)

Ignore this comment. That patch is doing ALTER TABLE recipe_task, not recipe_task_result which is the table we are concerned with in this bug. So implementing this won't do anything to help the very high cost of that migration.

Comment 3 matt jia 2016-04-13 05:43:56 UTC
On Gerrit:
   
    gerrit.beaker-project.org/4805

Comment 6 Dan Callaghan 2016-07-07 23:12:26 UTC
Beaker 23.0 has been released.


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