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 2017/06/23 23:26:00 UTC

[jira] [Commented] (SENTRY-1643) AutoIncrement ChangeID of MSentryPermChange/MSentryPathChange may be error-prone

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

Na Li commented on SENTRY-1643:
-------------------------------

The code review for this issue is in https://reviews.apache.org/r/58281/diff/3#index_header, and the deadlock issue with this code change is in sentry-1710.  

The reason Eddy had deadlock in sentry-1643 is because he updated changeID in application without removing value-strategy in package.jdo. So both application and DB update changeID. That causes deadlock. 


> AutoIncrement ChangeID of MSentryPermChange/MSentryPathChange may be error-prone
> --------------------------------------------------------------------------------
>
>                 Key: SENTRY-1643
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1643
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Hdfs Plugin
>    Affects Versions: sentry-ha-redesign
>            Reporter: Hao Hao
>            Assignee: Lei (Eddy) Xu
>            Priority: Critical
>             Fix For: sentry-ha-redesign
>
>         Attachments: SENTRY-1643.00-sentry-ha-redesign.patch, SENTRY-1643.01-sentry-ha-redesign.patch, SENTRY-1643.02-sentry-ha-redesign.patch
>
>
> In MSentryPermChange/MSentryPathChange table, the changeID field is auto-increment. 
> {noformat}
> <field name="changeID" primary-key="true" value-strategy="increment">
>   <column name="CHANGE_ID" jdbc-type="BIGINT" allows-null="false"/>
> </field>{noformat}
> However, found through the integration unit test TestHDFSIntegration, the value does not seem to be correctly auto increased. e.g Instead of increasing by one for each new entry, it increased by some unexpected number.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)