You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Pradeep Agrawal <pr...@gmail.com> on 2020/06/01 06:04:02 UTC

Re: Review Request 72555: RANGER-2840 : Create policy with non existing group is failing due to to multiple threads creating same group

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




security-admin/src/main/java/org/apache/ranger/biz/PolicyRefUpdater.java
Lines 419 (patched)
<https://reviews.apache.org/r/72555/#comment309642>

    "No Group created" => bit confusing message as the previous operation is search. may be you can consider changing it to "Group doesn't exist"



security-admin/src/main/java/org/apache/ranger/biz/PolicyRefUpdater.java
Lines 512 (patched)
<https://reviews.apache.org/r/72555/#comment309643>

    same as previous comment : 
    consider "User doesn't exist"


- Pradeep Agrawal


On May 29, 2020, 11:13 a.m., Dineshkumar Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72555/
> -----------------------------------------------------------
> 
> (Updated May 29, 2020, 11:13 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, Vishal Suvagia, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> When we try to create multiple policy using API having same non existing group. Group creation is failing due to  multiple thread tired to create same group at time.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/PolicyRefUpdater.java f978d5dfc 
> 
> 
> Diff: https://reviews.apache.org/r/72555/diff/2/
> 
> 
> Testing
> -------
> 
> Testcase 
>  Create multiple policy using API, different policy includes same group.
>  
> After patch policy and non existing group created successful.
> 
> 
> Thanks,
> 
> Dineshkumar Yadav
> 
>


Re: Review Request 72555: RANGER-2840 : Create policy with non existing group is failing due to to multiple threads creating same group

Posted by Dineshkumar Yadav <di...@outlook.com>.

> On June 1, 2020, 6:04 a.m., Pradeep Agrawal wrote:
> > security-admin/src/main/java/org/apache/ranger/biz/PolicyRefUpdater.java
> > Lines 419 (patched)
> > <https://reviews.apache.org/r/72555/diff/2/?file=2233546#file2233546line443>
> >
> >     "No Group created" => bit confusing message as the previous operation is search. may be you can consider changing it to "Group doesn't exist"

doAssociatePolicyGroup() is part of finally block of doCreateAndAssociatePolicyGroup() method which is expected to create and the associate group. Calling from finally means some other thread has already created the group. This message in that context.


> On June 1, 2020, 6:04 a.m., Pradeep Agrawal wrote:
> > security-admin/src/main/java/org/apache/ranger/biz/PolicyRefUpdater.java
> > Lines 512 (patched)
> > <https://reviews.apache.org/r/72555/diff/2/?file=2233546#file2233546line536>
> >
> >     same as previous comment : 
> >     consider "User doesn't exist"

logic is same as group


- Dineshkumar


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


On May 29, 2020, 11:13 a.m., Dineshkumar Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72555/
> -----------------------------------------------------------
> 
> (Updated May 29, 2020, 11:13 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, Vishal Suvagia, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> When we try to create multiple policy using API having same non existing group. Group creation is failing due to  multiple thread tired to create same group at time.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/PolicyRefUpdater.java f978d5dfc 
> 
> 
> Diff: https://reviews.apache.org/r/72555/diff/2/
> 
> 
> Testing
> -------
> 
> Testcase 
>  Create multiple policy using API, different policy includes same group.
>  
> After patch policy and non existing group created successful.
> 
> 
> Thanks,
> 
> Dineshkumar Yadav
> 
>