[
https://issues.apache.org/jira/browse/SENTRY-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15236583#comment-15236583
]
Dapeng Sun commented on SENTRY-458:
-----------------------------------
Hi [~hahao] since JDO upgraded after SENTRY-328, the fix are not work. I think
we may also need to fix it for the scenarios which have high-concurrency role
update operations(not only for HA). Since we haven't meet it currently, I
marked it as won't fix.
> 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)