A recipe should only have rows in system_recipe_map while it is still New/Processed/Queued. Once it is Scheduled the rows are removed. However I am seeing a very large number of rows in system_recipe_map for recipes that are Cancelled or Aborted. I am guessing that we are missing a bit of logic to clear system_recipe_map when a recipe is aborted or cancelled before it reaches Scheduled. I'm reasonably sure we used to have this so need to double-check that it wasn't intentionally removed to work around some other issue such as db deadlocks (we have some of those still open I think). But either way the current behaviour is not sustainable since the system_recipe_map table will grow unbounded. On Red Hat's Beaker it is currently at 7 million rows.
(In reply to Dan Callaghan from comment #0) > A recipe should only have rows in system_recipe_map while it is still > New/Processed/Queued. Once it is Scheduled the rows are removed. The cleanest solution might be to make update_status() or one of those related methods enforce this invariant. We will also need to find a way to clean out existing leftover rows from system_recipe_map.
On gerrit: http://gerrit.beaker-project.org/#/c/3967/ Matt Jia
(In reply to matt jia from comment #2) > On gerrit: > > http://gerrit.beaker-project.org/#/c/3967/ > > Matt Jia Have uploaded a new patch: http://gerrit.beaker-project.org/#/c/3971/ Matt Jia
Verify steps: 1. Creat a job 2. cancel it from WEB UI or using bkr job-cancel 3. login to the database and check if rows in the system_recipe_map are cleared the check sql statement could be sth like this: select * from system_recipe_map where recipe_id = <any recipe id in your job> it should return 0 as expected. Cheers,Matt Jia
Beaker 20.0 has been released.