You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Ajit Kumar (JIRA)" <ji...@apache.org> on 2016/06/15 17:25:09 UTC
[jira] [Created] (AMBARI-17260) Remove CascadeType in
ServiceComponentHistoryEntity for ServiceComponentDesiredStateEntity
Ajit Kumar created AMBARI-17260:
-----------------------------------
Summary: Remove CascadeType in ServiceComponentHistoryEntity for ServiceComponentDesiredStateEntity
Key: AMBARI-17260
URL: https://issues.apache.org/jira/browse/AMBARI-17260
Project: Ambari
Issue Type: Bug
Components: ambari-server
Affects Versions: 2.4.0
Reporter: Ajit Kumar
Assignee: Ajit Kumar
Fix For: 2.4.0
Service deletion throws '500: Server Error' due to foreign key constraint violation :
{code}
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`ambaricustom`.`servicecomponent_history`, CONSTRAINT `FK_sc_history_component_id` FOREIGN KEY (`component_id`) REFERENCES `servicecomponentdesiredstate` (`id`))
Error Code: 1451
Call: DELETE FROM servicecomponentdesiredstate WHERE (id = ?)
bind => [1 parameter bound]
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
{code}
Removing CascadeType in ServiceComponentHistoryEntity for ServiceComponentDesiredStateEntity should fix this.
Repro steps:
1. Deploy HDP-2.4 cluster with Ambari 2.4.0.0
2. Perform Express Upgrade to HDP 2.5
3. Try to delete Hive service (after stopping it)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)