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 2020/07/20 19:58:00 UTC
[jira] [Commented] (SENTRY-2422) HMS synchronization is causing
multiple entries of the same ID in SENTRY_HMS_NOTIFICATION_ID
[ https://issues.apache.org/jira/browse/SENTRY-2422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17161497#comment-17161497 ]
Na Li commented on SENTRY-2422:
-------------------------------
The code change should be at [https://github.com/apache/sentry/blob/master/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java#L4490]
1) in the same transaction
1.1) Get the current max notification ID using getLastProcessedChangeIDCore
1.2) If the input notificationId is smaller than or equal to the max value, simple return. Otherwise, persist the value
This should avoid duplicated values in notification ID in table SENTRY_HMS_NOTIFICATION_ID
> HMS synchronization is causing multiple entries of the same ID in SENTRY_HMS_NOTIFICATION_ID
> --------------------------------------------------------------------------------------------
>
> Key: SENTRY-2422
> URL: https://issues.apache.org/jira/browse/SENTRY-2422
> Project: Sentry
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.0.1
> Reporter: Brian Towles
> Assignee: Krishna Kalyan
> Priority: Major
>
> When processing updates for the HMS notifications, multiple entries of the same ID are being put into the SENTRY_HMS_NOTIFICATION_ID table.
> This can be seen after doing a non location changing ALTER TABLE in hive for example.
>
> ALTER TABLE sometable SET TBLPROPERTIES ("someproperty"="somevalue");
--
This message was sent by Atlassian Jira
(v8.3.4#803005)