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

Lenni Kuff commented on SENTRY-1292:
------------------------------------

This seems like a bit of a brittle fix since if the order ever changes it will 
result in a performance regression (perhaps someone inserts an element at the 
start of the enum). Can you be sure to add a comment on why you are using this 
order? Alternatively, you can add a method to the enum like 
"valuesInOptimizedOrder()" to make it explicit. 

> Reorder DBModelAction EnumSet
> -----------------------------
>
>                 Key: SENTRY-1292
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1292
>             Project: Sentry
>          Issue Type: Sub-task
>            Reporter: Hao Hao
>            Assignee: Hao Hao
>         Attachments: SENTRY-1292.0.patch
>
>
> Most real use case permission may be read only, e.g SELECT. Current 
> DBModelAction EnumSet. has ordering of INSERT, SELECT, ALL.  May need to 
> reorder it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to