-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62483/#review185944
-----------------------------------------------------------


Fix it, then Ship it!





security-admin/src/main/java/org/apache/ranger/db/XXServiceResourceDao.java
Lines 95 (patched)
<https://reviews.apache.org/r/62483/#comment262284>

    Wouldn't 0 be a better response here (and in line #89), as "-1" would block 
renaming?
    
    Alternate is to update ServiceDBStore.java:1491:
    From:
      if (countOfTaggedResources != 0L)
    To:
      if (countOfTaggedResources > 0L)


- Madhan Neethiraj


On Sept. 21, 2017, 11:11 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62483/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2017, 11:11 p.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-1795
>     https://issues.apache.org/jira/browse/RANGER-1795
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> If a service is renamed in the presence of tagged service-resources that 
> refer to the service (through service-id), then a major discrepancy is 
> introduced in security+governance database. Therefore, it is necessary to 
> fail service update under these circumstances.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
> da65074 
>   security-admin/src/main/java/org/apache/ranger/db/XXServiceResourceDao.java 
> 9859992 
>   security-admin/src/main/resources/META-INF/jpa_named_queries.xml 68548a5 
>   security-admin/src/test/java/org/apache/ranger/biz/TestServiceDBStore.java 
> 976fd0c 
> 
> 
> Diff: https://reviews.apache.org/r/62483/diff/1/
> 
> 
> Testing
> -------
> 
> Ran all unit tests successfully. Tested with local VM.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>

Reply via email to