You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Na Li (JIRA)" <ji...@apache.org> on 2018/09/13 16:44:00 UTC

[jira] [Updated] (SENTRY-2166) Privilege is not updated for table rename during full snapshot

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

Na Li updated SENTRY-2166:
--------------------------
    Fix Version/s:     (was: 2.1.0)

> Privilege is not updated for table rename during full snapshot
> --------------------------------------------------------------
>
>                 Key: SENTRY-2166
>                 URL: https://issues.apache.org/jira/browse/SENTRY-2166
>             Project: Sentry
>          Issue Type: Bug
>          Components: Sentry
>    Affects Versions: 2.1.0
>            Reporter: Na Li
>            Assignee: Na Li
>            Priority: Major
>
> It may take a while for sentry to get full snapshot from HMS. During this interval, table rename event could happen.
> The current behavior:
> 1) get notification ID before full snapshot: NotificationID_before
> 2) get full snapshot
> 3) get notification ID after full snapshot: NotificationID_after
> 4) If NotificationID_after != NotificationID_before, get notification events between, and apply them to the full snapshot through {color:#f79232}*FullUpdateModifier.applyEvent()*{color}. 
> 5) save the updated full snapshot with *{color:#d04437}NotificationID_after{color}*
>  
> When there is a privilege associated with the old table, and table rename event happens during full snapshot, the privilege is not associated with the renamed table. 
>  
> The solution is to change the behavior as following:
> 1) get notification ID before full snapshot: NotificationID_before
> 2) get full snapshot 
> 3) get notification ID after full snapshot: NotificationID_after
> 4) Save the full snapshot with {color:#d04437}*NotificationID_before*{color}
> 5) When HMSFollower gets notification events from *{color:#d04437}NotificationID_before{color},*   the notification events during full snapshot will be processed through {color:#f79232}*NotificationProcessor.processNotificationEvent()* {color}
> In this way, sentry always processes the notification events through {color:#f79232}*NotificationProcessor.processNotificationEvent()*{color}, and the privilege will be associated with renamed table.
> This issue only happens when events, such as table rename, happens during full snapshot. 
>  



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