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

(Updated Oct. 10, 2017, 3:47 a.m.)


Review request for ranger, Ankita Sinha, Don Bosco Durai, bhavik patel, Gautam 
Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Ramesh Mani, Selvamohan 
Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.


Changes
-------

Updated reviewer list


Bugs: RANGER-1826
    https://issues.apache.org/jira/browse/RANGER-1826


Repository: ranger


Description
-------

**Problem Statement:**
While importing bulk policies around 1000, OOM error is thrown, increasing the 
heap size is also not working as it seems EclipseLink holds all the objects and 
states of SQL operations for each delete policy request.

**Proposed Solution:**
To delete policies and its references rather relying on EclipseLink/JPA we can 
send delete request using native query so that EclipseLink object won't be 
created, and EclipseLink shall not hold too many objects in memory, which shall 
remove the cause of java.lang.OutOfMemoryError.

**Note:** Use of native query statement is discouraged so please suggest a 
better solution or provide a working solution.


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
bb43c53 
  
security-admin/src/main/java/org/apache/ranger/common/RangerServicePoliciesCache.java
 7d1f28c 
  security-admin/src/main/java/org/apache/ranger/common/db/BaseDao.java c2832ea 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java d8f217d 
  security-admin/src/test/java/org/apache/ranger/biz/TestServiceDBStore.java 
976fd0c 


Diff: https://reviews.apache.org/r/62841/diff/1/


Testing
-------

**Steps Performed (with patch):**
1. After mvn Build; untar the Ranger module and updated install.properties for 
MySQL DB flavor. 
2. Called setup.sh to execute Ranger setup script. 
3. Started Ranger admin and created a hdfs service 'hadoopdev'.
4. Tried to import Policies.

**Attempt-1:** When there are no policies except the default one in 'hadoopdev'.
Tried Import operation with 1000 policies.

**Expected Behavior:**
Policy import process should finish successfully.

**Actual Behavior:**
Policy import process finished successfully.

----
**Attempt-2:** There are already 1000 policies in the hdfs service 
'hadoopdev'(policies created during the previous attempt)
Tried Import operation again with 1000 policies.

**Expected Behavior:**
Policy import process should finish successfully.

**Actual Behavior:**
Policy import process finished successfully.

**Note:** 
Patch has been tested on all supported DB Flavors.


Thanks,

Pradeep Agrawal

Reply via email to