sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arun Suresh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SENTRY-332) A role may got empty privilege, although the role have some privileges
Date Mon, 14 Jul 2014 06:03:04 GMT

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

Arun Suresh commented on SENTRY-332:
------------------------------------

[~dapengsun], The {{SentryStore}} has a method called {{getMSentryPrivilegesByRoleName()}}
that calls the exact same method you posted. It looks like privileges are actually being returned.
This has been verified in multiple fast cases in the {{TestSentryStore}} class.

Could you post a testcase where you are hitting this issue ?

> A role may got empty privilege, although the role have some privileges
> ----------------------------------------------------------------------
>
>                 Key: SENTRY-332
>                 URL: https://issues.apache.org/jira/browse/SENTRY-332
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Dapeng Sun
>            Assignee: Dapeng Sun
>             Fix For: 1.4.0
>
>         Attachments: SENTRY-332.patch
>
>
> MSentryPrivilege is an embedded field of MSentryRole, When query a MSentryRole that contains
MSentryPrivilege as embedded fields, the embedded field MSentryPrivilege may returned as null.
> For example:
> {code:borderStyle=solid}
> MSentryRole mRole = getMSentryRole(pm, roleName);
> if (mRole != null) {
>      mRole.getPrivileges(); // the privileges may be null, although the role have privileges
> }
> {code}
> Solution:
> JDO defaults to lazy loading ´╝îMSentryPrivilege should be  eager-loading .



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message