kumaab opened a new pull request, #253:
URL: https://github.com/apache/ranger/pull/253

   ## What changes were proposed in this pull request?
   Addition of 2 new REST APIs to delete external users and groups.
   The proposed approach uses existing methods for deletion of users & groups 
via 2 REST API calls(1 for users and 1 for groups), all the processing of 
deletes happen in Java with immediate transaction commit for every user/group.
   
   
   Stats(time taken):
   - Users:
     - Deletion of **50k** users takes: **33 mins 28 seconds** @ **40 ms** per 
delete operation (This is still expensive, more on this later)
   - Groups:
     - Deletion of **100k** groups takes: **2 mins 51 seconds** @ **1.7 ms** 
per delete operation.
   
   Current benchmark: **5.3** seconds for every delete operation. 
([info](https://issues.apache.org/jira/browse/RANGER-3794))
   Improvement(via this PR): **133X** (for ex: to delete 50k users via current 
python scripts it would take 3 days and 2 hrs approx.)
   
   To further improve the running time of user deletes, db schema changes would 
be required as one possible approach.
   On average per delete operation 35 ms/40 ms (~ 88%) of the time goes in 
updating 64 tables which have FK constraints on _**x_portal_user**_ (more info 
[here](https://github.com/apache/ranger/blob/aea071ca7c029e45e08beb7392d50c582f0e0c68/security-admin/src/main/java/org/apache/ranger/service/XPortalUserService.java#L195))
   
   To avoid this "ON DELETE CASCADE" needs to be enabled for the respective db 
tables, which may improve the performance of the API significantly. 
   
   ## How was this patch tested?
   
   Tested using docker.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to