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

kalyan kumar kalvagadda commented on SENTRY-1726:
-------------------------------------------------

Initial approach will have some issues if HMSFollower is running in multiple 
sentry servers.
Best way to go is to store all the ID's of all the notifications that are 
processed by sentry server with NOTIFICATION_ID as the primary key.
As SENTRY_HMS_NOTIFICATION_ID and PATH_UPDATE tables are updated in the same 
transaction, persistent store will not be updated while processing duplicate 
notification.

{noformat}
CREATE TABLE `SENTRY_HMS_NOTIFICATION_ID`
(
    `NOTIFICATION_ID` BIGINT NOT NULL,
    CONSTRAINT `SENTRY_NOTIFICATION_PK` PRIMARY KEY (`NOTIFICATION_ID`)
)ENGINE=INNODB;
{noformat}

This approach needs additional cleanup task which periodically purges 
historical ID's.

> sql changes to store last notification-id processed
> ---------------------------------------------------
>
>                 Key: SENTRY-1726
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1726
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Sentry
>    Affects Versions: sentry-ha-redesign
>            Reporter: kalyan kumar kalvagadda
>            Assignee: kalyan kumar kalvagadda
>            Priority: Critical
>             Fix For: sentry-ha-redesign
>
>         Attachments: SENTRY-1726.001-sentry-ha-redesign.patch, 
> SENTRY-1726.002-sentry-ha-redesign.patch, 
> SENTRY-1726.003-sentry-ha-redesign.patch, 
> SENTRY-1726.004-sentry-ha-redesign.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to