Repository: sentry Updated Branches: refs/heads/master f222f3ec3 -> 47b437544
SENTRY-1292: Reorder DBModelAction EnumSet (Hao Hao, Reviewed by: Lenni Kuff) Change-Id: Id491beab4a37d3112cab9adb2ee32fad92ca3026 Project: http://git-wip-us.apache.org/repos/asf/sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/47b43754 Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/47b43754 Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/47b43754 Branch: refs/heads/master Commit: 47b437544ad1c5524a98f76390063396adc6abd5 Parents: f222f3e Author: hahao <[email protected]> Authored: Tue May 24 13:14:49 2016 -0700 Committer: hahao <[email protected]> Committed: Tue May 24 13:14:49 2016 -0700 ---------------------------------------------------------------------- .../java/org/apache/sentry/core/model/db/DBModelAction.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sentry/blob/47b43754/sentry-core/sentry-core-model-db/src/main/java/org/apache/sentry/core/model/db/DBModelAction.java ---------------------------------------------------------------------- diff --git a/sentry-core/sentry-core-model-db/src/main/java/org/apache/sentry/core/model/db/DBModelAction.java b/sentry-core/sentry-core-model-db/src/main/java/org/apache/sentry/core/model/db/DBModelAction.java index 209fb89..c5842d9 100644 --- a/sentry-core/sentry-core-model-db/src/main/java/org/apache/sentry/core/model/db/DBModelAction.java +++ b/sentry-core/sentry-core-model-db/src/main/java/org/apache/sentry/core/model/db/DBModelAction.java @@ -23,8 +23,11 @@ import org.apache.sentry.core.common.Action; */ public enum DBModelAction implements Action { - INSERT(AccessConstants.INSERT), + // SENTRY-1292 + // Need to ensure the order of enum to have SELECT in front to avoid performance + // regression. Since most real use case of permissions may be read only(SELECT). SELECT(AccessConstants.SELECT), + INSERT(AccessConstants.INSERT), ALTER(AccessConstants.ALTER), CREATE(AccessConstants.CREATE), DROP(AccessConstants.DROP),
