ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <>
Subject [jira] [Commented] (AMBARI-14972) Add PK to servicecomponentdesiredstate Table To Support FK Relationships
Date Tue, 09 Feb 2016 15:55:18 GMT


Hadoop QA commented on AMBARI-14972:

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment
  against trunk revision .

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:green}+1 tests included{color}.  The patch appears to include 5 new or modified
test files.

    {color:red}-1 javac{color:red}.  The patch appears to cause the build to fail.

Console output:

This message is automatically generated.

> Add PK to servicecomponentdesiredstate Table To Support FK Relationships
> ------------------------------------------------------------------------
>                 Key: AMBARI-14972
>                 URL:
>             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

View raw message