Bug 538157

Summary: Deleting content provider fails with SQL Error
Product: [Other] RHQ Project Reporter: Preethi Thomas <pthomas>
Component: ContentAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: cwelton, jortel
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-12 16:47:14 UTC Type: ---
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: 538145    

Description Preethi Thomas 2009-11-17 19:21:39 UTC
Description of problem:
Deleting content provider fails with SQL Error

Failed to delete content sources. Cause: javax.ejb.EJBException:javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query -> javax.persistence.PersistenceException:org.hibernate.exception.GenericJDBCException: could not execute query -> org.hibernate.exception.GenericJDBCException:could not execute query -> org.postgresql.util.PSQLException:ERROR: canceling statement due to statement timeout[SQLException=ERROR: canceling statement due to statement timeout]

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


How reproducible:


Steps to Reproduce:
1.Administration->Content->Content Provider->Create New-> RHN Hosted Source
2.Enter Values for all the required fields
3.Enter invalid location (htp:)
4. Click save
5 Administration->Content->Content Provider
6. Select a Content Provider
7.Click delete selected


  
Actual results:

Failed to delete content sources. Cause: javax.ejb.EJBException:javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query -> javax.persistence.PersistenceException:org.hibernate.exception.GenericJDBCException: could not execute query -> org.hibernate.exception.GenericJDBCException:could not execute query -> org.postgresql.util.PSQLException:ERROR: canceling statement due to statement timeout[SQLException=ERROR: canceling statement due to statement timeout]

Expected results:

Delete successful.

Additional info:

This could be because many of us being in the same server and having some sync going on.

Comment 1 Jeff Ortel 2009-11-25 18:30:55 UTC
Problem is an index on RHQ_REPO_PKG_VERSION_MAP ( PACKAGE_VERSION_ID ) is missing and the hibernate query used to do the cascading delete was doing full table scans on  RHQ_REPO_PKG_VERSION_MAP.  I added the index to the db schema and upgrade script for schema version 2.70.
9a58d0c7bb603c4ec3fe4eca096e2a4560a4296f

Comment 2 Corey Welton 2009-12-01 15:43:30 UTC
Fixing Component -> Content.

Comment 3 Corey Welton 2009-12-01 15:44:47 UTC
QA Verified.

Comment 4 Corey Welton 2010-08-12 16:47:14 UTC
Mass-closure of verified bugs against JON.