[ 
https://issues.apache.org/jira/browse/SENTRY-2370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16597061#comment-16597061
 ] 

Arjun Mishra commented on SENTRY-2370:
--------------------------------------

[~akolb] Yes the motivation was to not have to fetch from Sentry database when 
NN failed to get a full update (path or perm) which can sometimes take up to 30 
mins. The caching strategy is 
* Store Path/Perm Updates when they are created 
* On consecutive requests, we check image number and sequence number to 
determine if the cache is current. If yes, return the cache, else re-build it

Cache invalidation will be a part of another ticket since we want to invalidate 
cache once NN acknowledges receipt of full updates. But that is a part of 
SENTRY-2287 (https://issues.apache.org/jira/browse/SENTRY-2287) which is 
pending. 

> Create a cache of PathUpdates to send to NN
> -------------------------------------------
>
>                 Key: SENTRY-2370
>                 URL: https://issues.apache.org/jira/browse/SENTRY-2370
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Sentry
>    Affects Versions: 2.1.0
>            Reporter: Arjun Mishra
>            Assignee: Arjun Mishra
>            Priority: Major
>         Attachments: SENTRY-2370.01.patch, SENTRY-2370.02.patch
>
>
> When NN requests path updates from sentry and if it exceeds the time 
> threshold, on consecutive attempts sentry will attempt to fetch the full 
> update from scratch. Instead it should cache it and update the cache before 
> sending it to NN.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to