Bug 721320

Summary: ORA-02292 when trying to change the Alert definition
Product: [Other] RHQ Project Reporter: bkramer <bkramer>
Component: AlertsAssignee: RHQ Project Maintainer <rhq-maint>
Status: NEW --- QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 3.0.1CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description bkramer 2011-07-14 05:41:23 EDT
Description of problem:

Customer tried to change the Alert Definition just before the same alert was supposed to trigger. As a result of this, the following error is logged:


2011-07-13 10:37:37,451 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-02292: integrity constraint (JON.SYS_C0057927) violated - child record found.

A combination of looking at the logs near that error and grepping that log file for '10063' appears to show what is happening.


AlertDefinition 10063 is triggering every two minutes at 10:31:37, 10:33:37, 10:35:37, 10:37:37, 10:39:37 and so on.

1) At 10:37:05,799 the AlertTemplateManagerBean begins to update all the alertDefinitions based on a template, in response to the web UI.
2) At 10:37:37,396 the alert triggers
3) At 10:37:37,452 it tries to commit the changes it started in (1)

The commit from (3) fails because the triggering of the alert in (2) has added a record in the database, and the update only altered the records that existed when it started the transaction, since it can't know about the new one.


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

Additional Information:
Attached rhq-server-log4j.log file
Comment 1 bkramer 2011-07-14 05:50:20 EDT
Created attachment 512842 [details]
log file that shows the problem