[
https://issues.apache.org/jira/browse/AMBARI-14972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15163685#comment-15163685
]
Hudson commented on AMBARI-14972:
---------------------------------
ABORTED: Integrated in Ambari-trunk-Commit #4382 (See
[https://builds.apache.org/job/Ambari-trunk-Commit/4382/])
AMBARI-14972 - Add PK to servicecomponentdesiredstate Table To Support
(jhurley:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=697c309c19e04949f1bb9a746f5a5d1e87fb3e39])
* ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
* ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
*
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
*
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
*
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
* ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
*
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntityPK.java
*
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalogHelper.java
*
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
*
ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
* ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
* ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
*
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
*
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
*
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
*
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
*
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
* ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
*
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
* ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
*
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
*
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
*
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog150.java
AMBARI-14972 - Add PK to servicecomponentdesiredstate Table To Support
(jhurley:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=2a9f49c0e3a1839076fd271cb7caf09b3fc897f4])
*
ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/DeleteServiceTest.java
> Add PK to servicecomponentdesiredstate Table To Support FK Relationships
> ------------------------------------------------------------------------
>
> Key: AMBARI-14972
> URL: https://issues.apache.org/jira/browse/AMBARI-14972
> Project: Ambari
> Issue Type: Task
> Components: ambari-server
> Affects Versions: 2.4.0
> Reporter: Jonathan Hurley
> Assignee: Jonathan Hurley
> Priority: Critical
> Fix For: 2.4.0
>
> Attachments: AMBARI-14972.patch
>
>
> The {{servicecomponentdesiredstate}} table currently uses a compound PK based
> off of the cluster ID, service name, 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 {{servicecomponentdesiredstate}} table would
> now need knowledge of cluster/service/component 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.
> We should change this table 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)