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




security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminCache.java
Lines 149 (patched)
<https://reviews.apache.org/r/73743/#comment312876>

    finally is executed after exception block. This would cause 
policyAdminWrapper to be set to null in #146, resulting in unlock() not getting 
called in #150. Please review and update.



security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminCacheForEngineOptions.java
Line 64 (original), 63 (patched)
<https://reviews.apache.org/r/73743/#comment312875>

    to avoid multiple threads adding RangerPolicyAdminCache objects for same 
option:
    
    if (policyAdminCache == null) {
      synchronized (this) {
        policyAdminCache = policyAdminCacheForEngineOptions.get(options);
    
        if (policyAdminCache == null) {
          policyAdminCache = new RangerPolicyAdminCache();
        
          policyAdminCacheForEngineOptions.put(options, policyAdminCache);
        }
      }
    }


- Madhan Neethiraj


On Dec. 7, 2021, 1:23 a.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73743/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2021, 1:23 a.m.)
> 
> 
> Review request for ranger, Kishor Gollapalliwar, Madhan Neethiraj, Pradeep 
> Agrawal, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3538
>     https://issues.apache.org/jira/browse/RANGER-3538
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> It is desirable to reduce the granularity of locking of critical sections in 
> order to improve the throughput of Ranger admin while maintaining correctness 
> in the face of multiple threads trying to build/retrieve required policy 
> engine.
> 
> 
> Diffs
> -----
> 
>   
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminCache.java
>  5a69231ef 
>   
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminCacheForEngineOptions.java
>  224bdc258 
> 
> 
> Diff: https://reviews.apache.org/r/73743/diff/2/
> 
> 
> Testing
> -------
> 
> Passed all unit tests.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>

Reply via email to