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.
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
Fixing Component -> Content.
QA Verified.
Mass-closure of verified bugs against JON.