ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siddharth Wagle (JIRA)" <>
Subject [jira] [Created] (AMBARI-13894) Refactor delete configs on delete service action
Date Fri, 13 Nov 2015 23:42:10 GMT
Siddharth Wagle created AMBARI-13894:

             Summary: Refactor delete configs on delete service action
                 Key: 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

This is not an issue mostly because of the way ClusterConfig and ServiceConfig are being used.

    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;

Today, when you delete Service, the code deletes ServiceConfig entries associated with the

void deleteAllServiceConfigs()

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

This message was sent by Atlassian JIRA

View raw message