Ramachandran created RANGER-4560:
------------------------------------
Summary: 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
Affects Versions: 2.4.0
Reporter: Ramachandran
Assignee: Ramachandran
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)