[ 
https://issues.apache.org/jira/browse/RANGER-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ramachandran updated RANGER-4560:
---------------------------------
    Attachment: 0001-RANGER-4560-Ranger-Roles-Cache-improvement-to-reduce.patch

> Ranger Roles Cache improvement to reduce DB calls to the Database
> -----------------------------------------------------------------
>
>                 Key: RANGER-4560
>                 URL: https://issues.apache.org/jira/browse/RANGER-4560
>             Project: Ranger
>          Issue Type: Improvement
>          Components: Ranger
>            Reporter: Ramachandran
>            Assignee: Ramachandran
>            Priority: Major
>         Attachments: 
> 0001-RANGER-4560-Ranger-Roles-Cache-improvement-to-reduce.patch
>
>
> How Ranger uses the Roles Cache (In-Memory)
> When the lastKnownRoleVersion and rangerRoleVersionInDB are equal then return 
> null. Because roles have not changed since the last time
> otherwise, It will fetch the roles from the Database update the cache, and 
> then return roles to the User/Ranger Plugins
> As part of Ranger Roles Cache improvement, we have added the below logic
> When the rolesVersionInDB and cachedRolesVersion are equal then return cached 
> RangerRoles.Because RangerRoles have not changed since the last time we 
> fetched
> How it will improve the Ranger Roles Cache
> When the user/Client(Ranger Plugin) sends the lastKnownRoleVersion as -1 or 
> null, Ranger Roles Cache internally check whether rolesVersionInDB and 
> cachedRolesVersion are equal or not ?. If it equal means, it will fetch it 
> from the Cache rather than fetching the roles from the database update the 
> cache, and then return roles to the User/Ranger Plugins



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to