abhiishek26 opened a new pull request, #1185: URL: https://github.com/apache/ranger/pull/1185
## What changes were proposed in this pull request? 1>Currently, when RangerUserStoreCache refreshes the user store from the database, it always attempts to load user-to-group mappings. In large deployments with a high number of users and groups, loading these mappings on every refresh can significantly increase overhead . 2>I have made it to flag based approach , if flag is set to true then the mappings to the plugins will be provided by the UserStore download apis else not . 3>The major cause of performance bottleneck was final Map<String, Set<String>> userGroups = xUserMgr.getUserGroups(); which has been changed to final Map<String, Set<String>> userGroups = downloadUserGroupsEnabled ? xUserMgr.getUserGroups() : new HashMap<>(); so based on the requirements we can download or skip user-group mappings in UserStore for Plugins ## How was this patch tested? 1>For performance testing this patch was tested for 1 million users and .5 million groups where every 2 user was mapped to one group creating .5 million mappings 2>mvn clean test and mvn clean install were performed locally -- 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]
