-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59655/
-----------------------------------------------------------
Review request for sentry, Alexander Kolbasov, Brian Towles, Hao Hao, Na Li,
Sergio Pena, Vamsee Yarlagadda, and Vadim Spector.
Bugs: SENTRY-1788
https://issues.apache.org/jira/browse/SENTRY-1788
Repository: sentry
Description
-------
Root Cause: Application was using JDO object even after the associated database
entry was deleted.
Fix: Made code change so that JDO object is detached so that deletion of data
in the database would not invalidate the object used by the application. parent
object which is an JDO object used in
SentryStore.dropOrRenamePrivilegeForAllRoles after associated data in the
database is deleted. Method alterSentryRoleRevokePrivilegeCore which called
would internally delete the data from database.As part of this exercise I have
identified some optimization as well.
Optimization:
dropOrRenamePrivilegeForAllRoles method handles both drop and rename of
privileges. There is certain logic which constructs privilege graph which is
executed for both dropping and renaming of the privilege. This logic needs to
be executed only for renaming of privileges as the privilege graph constructed
is used only when the privilege is renamed.
Diffs
-----
sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
958a46c
Diff: https://reviews.apache.org/r/59655/diff/1/
Testing
-------
Thanks,
kalyan kumar kalvagadda