[
https://issues.apache.org/jira/browse/AMBARI-19164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15751826#comment-15751826
]
Hudson commented on AMBARI-19164:
---------------------------------
FAILURE: Integrated in Jenkins build Ambari-branch-2.5 #537 (See
[https://builds.apache.org/job/Ambari-branch-2.5/537/])
AMBARI-19164. Add PK to hostcomponentdesiredstate Table To Support FK (stoader:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d9a03d43c41e50bd19435328fb3e8cd71307fe21])
* (edit) ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
* (edit)
ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
* (edit) ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/orm/helpers/dbms/DbmsHelper.java
* (edit) ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
* (edit)
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
* (edit)
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
* (edit)
ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
* (edit)
ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/orm/helpers/dbms/GenericDbmsHelper.java
* (edit) ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
* (edit) ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java
* (delete)
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntityPK.java
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
* (edit) ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
> Add PK to hostcomponentdesiredstate Table To Support FK Relationships
> ---------------------------------------------------------------------
>
> Key: AMBARI-19164
> URL: https://issues.apache.org/jira/browse/AMBARI-19164
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Reporter: Sebastian Toader
> Assignee: Sebastian Toader
> Priority: Critical
> Fix For: 2.5.0
>
> Attachments: AMBARI-19164.v4.patch
>
>
> The {{hostcomponentdesiredstate}} table currently uses a compound PK based
> off of the cluster ID, service name, host id and component name. There are
> several problems with this approach:
> * Primary Keys should be data that's not part of the business logic of the
> system and not subject to be changed potentially (as strings are).
> * Other tables referencing the {{hostcomponentdesiredstate}} table would now
> need knowledge of cluster/service/component/host in order to make the correct
> FK association. This leads to extra data being tracked as well as data
> duplication.
> * Some databases, such as SQL Server, have problems with the indexing of
> compound PKs and may lead to deadlocks when querying and updating
> concurrently.
> This table needs to be changed so that it uses a simple PK for referencing.
> FK relationships as they exist today can still be maintained as long as a
> {{UNIQUE}} constraint is placed on the table. We should:
> * Add a {{UNIQUE}} constraint to the former PK columns
> * Add an {{INDEX}} to the former PK columns
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)