-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74758/
-----------------------------------------------------------

(Updated Nov. 27, 2023, 3:19 p.m.)


Review request for ranger, Don Bosco Durai, Abhay Kulkarni, Madhan Neethiraj, 
Mehul Parikh, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, 
Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.


Summary (updated)
-----------------

RANGER-4560:Ranger Roles Cache improvement to reduce DB calls to the Database


Bugs: RANGER-4560
    https://issues.apache.org/jira/browse/RANGER-4560


Repository: ranger


Description
-------

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


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/common/RangerRoleCache.java 
933104a16 


Diff: https://reviews.apache.org/r/74758/diff/1/


Testing
-------


Thanks,

Ramachandran Krishnan

Reply via email to