Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1209301

Summary: RFE: Replace database trigger with a JPA entity listener
Product: [Retired] Zanata Reporter: Sean Flanigan <sflaniga>
Component: DatabaseChange, DeploymentAssignee: Damian Jansen <djansen>
Status: CLOSED UPSTREAM QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.7CC: aeng, zanata-bugs
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: 2015-07-29 01:59:14 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:

Description Sean Flanigan 2015-04-07 02:00:23 UTC
Description of problem:

We should replace our last remaining database trigger (HDocument_Update) with a JPA entity listener to avoid the permission problems associated with database triggers in our deployment environments.  

On older versions of MySQL (5.1, from memory), the only way to create a trigger is using a SUPER user, but if that user is later deleted, or if the SUPER privilege is removed, the trigger starts causing runtime errors.

We already removed the triggers for HTextFlow and HTextFlowTarget, so we might as well switch over completely and remove a recurrent deployment problem.  See the classes HTextFlow.EntityListener and HTextFlowTarget.EntityListener for the previous examples.

Comment 1 Sean Flanigan 2015-04-08 07:24:08 UTC
Alternatively, if we want to keep using triggers, at startup Zanata should check that they are working correctly, and abort the deployment (with an error message which explains how to fix the problem).

Comment 2 Zanata Migrator 2015-07-29 01:59:14 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-119