sentry-commits mailing list archives

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


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

> Enable optimistic locking for SENTRY high availability
> ------------------------------------------------------
>                 Key: SENTRY-458
>                 URL:
>             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

View raw message