> On Nov. 17, 2015, 12:42 p.m., Sebastian Toader wrote: > > Ship It!
Can you perform the same manual test but this time with the cluster deployed with Blueprint? - Sebastian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40374/#review106836 ----------------------------------------------------------- On Nov. 17, 2015, 2:43 a.m., Sid Wagle wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/40374/ > ----------------------------------------------------------- > > (Updated Nov. 17, 2015, 2:43 a.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav > Papirkovskyy, Sumit Mohanty, and Sebastian Toader. > > > Bugs: AMBARI-13894 > https://issues.apache.org/jira/browse/AMBARI-13894 > > > Repository: ambari > > > Description > ------- > > Today, when you delete Service, the code deletes ServiceConfig entries > associated with the Service. This in turn deletes ClusterConfig entities due > to a Cascade.REMOVE on the many to many relationship. > 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. > If this changes in future then the ManyToMany relationship with CASCADE > delete may create problem. Also, there is no API way to restrict this. > > Changes: > - Remove Casacade.REMOVE from the ServiceConfigEntity -> ClusterConfigEntity > - Move @Transactional remove inside the Write lock boundaries() > - Modified deleteService to remove Config history and not ClusterConfigs > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntity.java > 5e18014 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java > f5bdbf9 > ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java > 74f9e02 > > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java > e4605d3 > > ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java > edd6267 > > Diff: https://reviews.apache.org/r/40374/diff/ > > > Testing > ------- > > Added a new unit test for deleteService changes. > > Manually verified Add Service -> Change configs -> Delete Service -> Re-add > service, Verify Service Config points to default configs. > > > Thanks, > > Sid Wagle > >
