[
https://issues.apache.org/jira/browse/RANGER-4907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877966#comment-17877966
]
Subhrat Chaudhary commented on RANGER-4907:
-------------------------------------------
Hi [~abhi_2110] , thanks for the suggestion, but the approach mentioned in
RANGER-4246 will not help much, since for policy update we have many checks
which make DB calls. We can improve this drastically, by adding following
changes:
* remove user-group associations based on id, instead of deleting the objects
as suggested in RANGER-3681
* overload policy update method to update only the policyText in ranger
policy, since no other change is being made.
With these changes we can see improvement in user deletion from 8 min to 10 sec
(for a user with 10k groups and 10k policies). I will share the patch shortly
for same.
> Optimize user delete operation
> ------------------------------
>
> Key: RANGER-4907
> URL: https://issues.apache.org/jira/browse/RANGER-4907
> Project: Ranger
> Issue Type: Improvement
> Components: admin
> Reporter: Subhrat Chaudhary
> Assignee: Subhrat Chaudhary
> Priority: Major
>
> If a user has large number of associations with groups, policies, the user
> delete operation can take large amount of time, especially while updating the
> policies. Since to update a policy, we have large number of validations in
> place. This can be even worse, if multiple user delete requests are received
> at the same time. We can add following optimizations to improve the user
> delete performance:
> * Remove foreign key relation of x_user with x_auth_sess, with this we can
> skip updating the user references in x_auth_sess when a user is deleted.
> * Currently all policy reference for a user are cleaned up and updated ones
> are added again. We can remove policy reference only for the user being
> deleted.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)