sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dapeng Sun (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SENTRY-458) Enable optimistic locking for SENTRY high availability
Date Mon, 27 Oct 2014 02:07:33 GMT

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

Dapeng Sun updated SENTRY-458:
------------------------------
    Issue Type: Bug  (was: Sub-task)
        Parent:     (was: SENTRY-427)

> Enable optimistic locking for SENTRY high availability
> ------------------------------------------------------
>
>                 Key: SENTRY-458
>                 URL: https://issues.apache.org/jira/browse/SENTRY-458
>             Project: Sentry
>          Issue Type: Bug
>            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)

Mime
View raw message