You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Na Li via Review Board <no...@reviews.apache.org> on 2019/12/29 05:14:21 UTC
Review Request 71942: SENTRY-2545: Rolling back Privilege Cache to
SimplePrivilegeCache does not work
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71942/
-----------------------------------------------------------
Review request for sentry and kalyan kumar kalvagadda.
Bugs: sentry-2545
https://issues.apache.org/jira/browse/sentry-2545
Repository: sentry
Description
-------
The change in SENTRY-2539 uses TreePrivilegeCache as default implementation of privilege cache to improve authorization performance. However, rolling back to SimplePrivilegeCache does not work due to how Sentry creates the privilege cache.
The solution is to create the privilege cache based on configured class name and handle different constructor inputs properly.
More test cases are added to verify that rollback works.
Diffs
-----
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzBindingHookBase.java a4b664b
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/MetastoreAuthzBindingBase.java bc7a554
sentry-provider/sentry-provider-cache/src/test/java/org/apache/sentry/provider/cache/TestSimpleFilteredPrivilegeCache.java 4615bd4
sentry-provider/sentry-provider-cache/src/test/java/org/apache/sentry/provider/cache/TestSimplePrivilegeCache.java PRE-CREATION
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java 86e7d14
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestEndToEndWithSimpleCache.java PRE-CREATION
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/metastore/TestMetastoreEndToEndWithSimpleCache.java PRE-CREATION
Diff: https://reviews.apache.org/r/71942/diff/1/
Testing
-------
Add new tests and they all passed.
Thanks,
Na Li
Re: Review Request 71942: SENTRY-2545: Rolling back Privilege Cache to
SimplePrivilegeCache does not work
Posted by Na Li via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71942/
-----------------------------------------------------------
(Updated Dec. 29, 2019, 5:23 a.m.)
Review request for sentry and kalyan kumar kalvagadda.
Bugs: sentry-2545
https://issues.apache.org/jira/browse/sentry-2545
Repository: sentry
Description
-------
The change in SENTRY-2539 uses TreePrivilegeCache as default implementation of privilege cache to improve authorization performance. However, rolling back to SimplePrivilegeCache does not work due to how Sentry creates the privilege cache.
The solution is to create the privilege cache based on configured class name and handle different constructor inputs properly.
More test cases are added to verify that rollback works.
Diffs (updated)
-----
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzBindingHookBase.java a4b664b
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/MetastoreAuthzBindingBase.java bc7a554
sentry-provider/sentry-provider-cache/src/test/java/org/apache/sentry/provider/cache/TestSimpleFilteredPrivilegeCache.java 4615bd4
sentry-provider/sentry-provider-cache/src/test/java/org/apache/sentry/provider/cache/TestSimplePrivilegeCache.java PRE-CREATION
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java 86e7d14
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestEndToEndWithSimpleCache.java PRE-CREATION
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/metastore/TestMetastoreEndToEndWithSimpleCache.java PRE-CREATION
Diff: https://reviews.apache.org/r/71942/diff/2/
Changes: https://reviews.apache.org/r/71942/diff/1-2/
Testing
-------
Add new tests and they all passed.
Thanks,
Na Li