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

Na Li reopened SENTRY-2109:
---------------------------

The following scenario may have issue

 

1) sentry gets notification events: 1, 2, 3, 4, 6

2) with your fix, sentry is getting events equal or after 1, now it gets 1, 2, 
3 ,4 , 5, 6

3) events 1, 2, 3, 4, 6 are processed already, and their hash is saved in table 
SENTRY_PATH_CHANGE. NOTIFICATION_HASH has to be unique due to "CREATE UNIQUE 
INDEX `NOTIFICATION_HASH_INDEX` ON `SENTRY_PATH_CHANGE` (`NOTIFICATION_HASH`);"

4) When they are processed again and saved into DB, duplicate key exception 
will happen, and retry will happen. That will cause the thread for syncing HMS 
in retry instead of getting new notifications. 

 

Can you add unit test case for getting multiple duplicate events, and see if 
the above issue exists? If so, we need to have code to check events already 
processed, if so, skip processing and saving them into DB. We have filter for 
the first duplicated event, but not for the multiple duplicated events.

> Fix the logic of identifying HMS out of Sync and handle gaps and 
> out-of-sequence notifications.
> -----------------------------------------------------------------------------------------------
>
>                 Key: SENTRY-2109
>                 URL: https://issues.apache.org/jira/browse/SENTRY-2109
>             Project: Sentry
>          Issue Type: Bug
>          Components: Sentry
>    Affects Versions: 2.1.0
>            Reporter: kalyan kumar kalvagadda
>            Assignee: kalyan kumar kalvagadda
>            Priority: Major
>             Fix For: 2.1.0
>
>         Attachments: SENTRY-2109.001.patch, SENTRY-2109.002.patch, 
> SENTRY-2109.003.patch, SENTRY-2109.004.patch, SENTRY-2109.005.patch, 
> SENTRY-2109.006.patch, SENTRY-2109.007.patch, SENTRY-2109.008.patch, 
> SENTRY-2109.009.patch, SENTRY-2109.010.patch, SENTRY-2109.010.patch, 
> SENTRY-2109.011.patch, SENTRY-2109.012.patch, SENTRY-2109.012.patch, 
> SENTRY-2109.012.patch, Screenshot_HMS_NOTIFICATION_LOG.png
>
>
> Currently HMSFollower proactively checks if sentry is out of sync with HMS 
> and initiates full snapshot, if needed.
> There will be false positives with the current logic if there are gaps in the 
> event-id in the notification log sequence.
> This jira is aimed at making that logic robust.



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

Reply via email to