sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dapeng Sun (JIRA)" <>
Subject [jira] [Commented] (SENTRY-339) Remove PrivilegeName column and constructPrivilegeName() function
Date Thu, 17 Jul 2014 03:06:05 GMT


Dapeng Sun commented on SENTRY-339:

Hi [~asuresh]
bq. So, I was actually more interested in imposing a unique constraint on a set of columns..
not so much an index. But yeah, I agree the index with unique flag set to true should enforce
it.. will update the patch.
Thank you for your accept. I think the set should cover all the columns which method {{private
MSentryPrivilege getMSentryPrivilege(TSentryPrivilege tPriv, PersistenceManager pm)}} used.
bq. When we were using privilegeName earlier, the grantorPrincipal was not a part of it. only
server, db, table, uri and action. I wanted to make just the minimun changes to the thrift
file to support this. Also, unique constraint for certains DBs require non-null column, which
is why we need server, db, table, uri and action to be non-null. We have no such requirement
for the grantorPrincipal column.
Got it! Thank you.

> Remove PrivilegeName column and constructPrivilegeName() function
> -----------------------------------------------------------------
>                 Key: SENTRY-339
>                 URL:
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: db_policy_store
>            Reporter: Arun Suresh
>            Assignee: Arun Suresh
>         Attachments: SENTRY-339.1.patch, SENTRY-339.2.patch
> The {{privilegeName}} column in the Privilege table was initially created to enforce
uniqueness of Privileges with same server+db+table+uri+action. This can be done using composite
unique key constraint in the underlying db.
> It would also cleanup the Sentry Store codebase a bit.. 

This message was sent by Atlassian JIRA

View raw message