Bug 1322700

Summary: delete recipe_task_result rows for deleted jobs
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: generalAssignee: matt jia <mjia>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 22CC: dcallagh, dowang, mjia, rjoost
Target Milestone: 23.0Keywords: FutureFeature, Patch, UserExperience
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1337790 (view as bug list) Environment:
Last Closed: 2016-07-07 23:12:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1337790    

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.