You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Hao Hao (JIRA)" <ji...@apache.org> on 2016/04/11 20:50:25 UTC

[jira] [Commented] (SENTRY-458) Enable optimistic locking for SENTRY high availability

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

Hao Hao commented on SENTRY-458:
--------------------------------

[~dapengsun] Would you mind explain a bit why this is resolved as won't fix? Updated JDO will not require the optimistic locking? Thanks!

> Enable optimistic locking for SENTRY high availability
> ------------------------------------------------------
>
>                 Key: SENTRY-458
>                 URL: https://issues.apache.org/jira/browse/SENTRY-458
>             Project: Sentry
>          Issue Type: Sub-task
>            Reporter: Dapeng Sun
>            Assignee: Dapeng Sun
>         Attachments: SENTRY-458.patch
>
>
> JDO has lock mechanism, as HA design doc SENTRY-427 has discuss , we use optimistic lock in HA mode, the patch will enable it
> * the code changed in SentryStore and MSentryPrivilege will make sure version auto-increment per operation, (Quote the design doc: Privilege and Role is M-N relationship, the grant/revoke will do add/remove in Role_Privilege_MAP, the version should be added to Role_Privilege_MAP, but currently we use jdo auto-generate the Role_Privilege_MAP, so the version could only be added to Role.)
> * Add version in package.jdo
> * Add @VisibleForTesting CommitContext alterSentryRoleGrantPrivilege(String grantorPrincipal, MSentryRole mRole, TSentryPrivilege privilege) throws SentryUserException for test, it will help reproduce makePersistent a lower version MSentryRole and get a JDOOptimisticVerificationException



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)