ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-13894) Refactor delete configs on delete service action
Date Wed, 18 Nov 2015 00:08:10 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-13894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15009885#comment-15009885
] 

Hudson commented on AMBARI-13894:
---------------------------------

FAILURE: Integrated in Ambari-branch-2.1 #882 (See [https://builds.apache.org/job/Ambari-branch-2.1/882/])
AMBARI-13894. Refactor delete configs on delete service action. Bug fix (swagle: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=9cf3bca8ea4f69b6e5528c31a039d7cc8c358e96])
* ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java


> Refactor delete configs on delete service action
> ------------------------------------------------
>
>                 Key: AMBARI-13894
>                 URL: https://issues.apache.org/jira/browse/AMBARI-13894
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-server
>    Affects Versions: 2.0.0
>            Reporter: Siddharth Wagle
>            Assignee: Siddharth Wagle
>            Priority: Critical
>             Fix For: 2.1.3
>
>         Attachments: AMBARI-13894-1.patch
>
>
> This is not an issue mostly because of the way ClusterConfig and ServiceConfig are being
used.
> {code}
>   @JoinTable(
>     name = "serviceconfigmapping",
>     joinColumns = {@JoinColumn(name = "service_config_id", referencedColumnName = "service_config_id")},
>     inverseJoinColumns = {@JoinColumn(name = "config_id", referencedColumnName = "config_id")}
>   )
>   @ManyToMany(cascade = { CascadeType.REMOVE })
>   private List<ClusterConfigEntity> clusterConfigEntities;
> {code}
> Today, when you delete Service, the code deletes ServiceConfig entries associated with
the Service.
> ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java
> {code}
> void deleteAllServiceConfigs()
> {code}
> This in turn deleted ClusterConfig entities.
> Stack allows a multiple services to be dependent on the same config while today ServiceConfig
and ClusterConfig are not used that way as UI only shows one kind of config on a single page.
But if this changes in future then the ManyToMany relationship with CASCADE delete may create
problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message