Bug 1128496 - Rule Engine should work correctly with multiple job queues
Summary: Rule Engine should work correctly with multiple job queues
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Internal Tools
Version: 4.4
Hardware: All
OS: All
high
high vote
Target Milestone: 4.4
Assignee: Simon Green
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-10 21:34 UTC by Simon Green
Modified: 2018-12-09 06:29 UTC (History)
4 users (show)

Fixed In Version: 4.4.5024
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-27 00:28:17 UTC


Attachments (Terms of Use)

Description Simon Green 2014-08-10 21:34:51 UTC
Description of problem:
When dogfooding the Rules Engine, we found that some rules were been actioned twice (see bug 1128008).

Version-Release number of selected component (if applicable):
4.4.4022

How reproducible:
always

Steps to Reproduce:
1. Create a rule that runs on job creation time
2. Have multiple job queues running
3. Create a bug

Actual results:
The rule appears to fire multiple times

Expected results:
The rule should run once.

Additional info:
The root cause of this is when creating a bug, both a 'create' and an 'update' job is created for the job. Since Red Hat have multiple job queues, they both ran at the same time (one on each server) and weren't aware that the other queue was also processing the bug.

There are two thing that should be fixed.

1) If possible, we should create a 'create' job only when creating a bug.

2) The above doesn't fix the problem where a bug is updated multiple times (e.g. two RPC calls, or if the job queue was disabled and two updates were done in quick succession). To handle that unlikely situation, we need to check that there is no lowered numbered (ts_job.id) job in the queue for the same bug, excluding dry runs (which don't change the bug).

Comment 1 Simon Green 2014-08-11 05:48:58 UTC
(In reply to Simon Green from comment #0)
> There are two thing that should be fixed.
> 
> 1) If possible, we should create a 'create' job only when creating a bug.

This cannot be done. Upstream code calls update after setting the bug flags.

Comment 7 Simon Green 2014-08-27 00:28:17 UTC
This change is now live. If there are any issues, do not reopen this bug.
Instead, you should create a new bug and reference this bug.


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