[
https://issues.apache.org/jira/browse/SENTRY-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14021056#comment-14021056
]
SentryQA commented on SENTRY-181:
---------------------------------
Here are the results of testing the latest attachment
https://issues.apache.org/jira/secure/attachment/12648847/SENTRY-181.patch
against master.
{color:red}Overall:{color} -1 due to 2 errors
{color:red}ERROR:{color} mvn test exited 1
{color:red}ERROR:{color} Failed:
org.apache.sentry.provider.db.service.persistent.TestSentryStoreToAuthorizable
Console output:
http://bigtop01.cloudera.org:8080/job/PreCommit-SENTRY-Build/107/console
This message is automatically generated.
> Improve error handling of duplicate privileges on same object in Sentry
> Policy Service
> --------------------------------------------------------------------------------------
>
> Key: SENTRY-181
> URL: https://issues.apache.org/jira/browse/SENTRY-181
> Project: Sentry
> Issue Type: Bug
> Affects Versions: 1.3.0
> Reporter: Lenni Kuff
> Assignee: Jarek Jarcec Cecho
> Labels: grant/revoke
> Fix For: 1.4.0
>
> Attachments: SENTRY-181.patch
>
>
> The error I get when the same privilege is added twice to a role is not very
> user friendly. I feel that this case should probably not even be an error (if
> the privilege already exists just return with Status OK).
> {code}
> java.lang.RuntimeException: Unknown error for request:
> TAlterSentryRoleGrantPrivilegeRequest(protocol_version:1,
> requestorUserName:lskuff, requestorGroupNames:[lskuff],
> roleName:insert_functional_alltypes,
> privilege:TSentryPrivilege(privilegeScope:TABLE, serverName:server1,
> dbName:alltypes, tableName:functional, action:INSERT,
> createTime:1398272883261, grantorPrincipal:lskuff)), message: Insert of
> object
> "org.apache.sentry.provider.db.service.model.MSentryPrivilege@6c4fb761" using
> statement "INSERT INTO "SENTRY_DB_PRIVILEGE"
> ("DB_PRIVILEGE_ID","CREATE_TIME","URI","ACTION","TABLE_NAME","DB_NAME","GRANTOR_PRINCIPAL","PRIVILEGE_SCOPE","PRIVILEGE_NAME","SERVER_NAME")
> VALUES (?,?,?,?,?,?,?,?,?,?)" failed : ERROR: duplicate key value violates
> unique constraint "SENTRY_PRIVILEGE_NAME"
> Detail: Key ("PRIVILEGE_NAME")=(server1+alltypes+functional+INSERT) already
> exists.. Server Stacktrace: javax.jdo.JDODataStoreException: Insert of object
> "org.apache.sentry.provider.db.service.model.MSentryPrivilege@6c4fb761" using
> statement "INSERT INTO "SENTRY_DB_PRIVILEGE"
> ("DB_PRIVILEGE_ID","CREATE_TIME","URI","ACTION","TABLE_NAME","DB_NAME","GRANTOR_PRINCIPAL","PRIVILEGE_SCOPE","PRIVILEGE_NAME","SERVER_NAME")
> VALUES (?,?,?,?,?,?,?,?,?,?)" failed : ERROR: duplicate key value violates
> unique constraint "SENTRY_PRIVILEGE_NAME"
> Detail: Key ("PRIVILEGE_NAME")=(server1+alltypes+functional+INSERT) already
> exists.
> at
> org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:451)
> at
> org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:732)
> at
> org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:752)
> at
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)