> On Dec. 10, 2018, 9:18 p.m., kalyan kumar kalvagadda wrote: > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java > > Lines 3447-3470 (original), 3447-3462 (patched) > > <https://reviews.apache.org/r/69530/diff/3/?file=2112732#file2112732line3447> > > > > I agree with lina's comment. > > > > here is my suggested approach > > Currently there is no filter provided while fetching, > > MAuthzPathsMapping. Add a new API which takes the paths as filter so that > > all the paths are fetches. With this, only paths match the pattern are > > fetches from database. > > > > This solves the issue with fetching all the paths associated with an > > authzObj.
Kalyan, as discussed that approaach won't work as AUTHZ_PATHS_MAPPING object retrieved will get all references to all associated AUTHZ_PATH objects - Arjun ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/69530/#review211168 ----------------------------------------------------------- On Dec. 11, 2018, 12:07 a.m., Arjun Mishra wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/69530/ > ----------------------------------------------------------- > > (Updated Dec. 11, 2018, 12:07 a.m.) > > > Review request for sentry, Haley Reeve, kalyan kumar kalvagadda, Na Li, and > Sergio Pena. > > > Bugs: SENTRY-2476 > https://issues.apache.org/jira/browse/SENTRY-2476 > > > Repository: sentry > > > Description > ------- > > Right now when we process a drop partition event, we fetch each path object > for paths_mapping object then find the one we want to delete and then delete > it. We should avoid fetching all objects and directly delete the path that > needs to be deleted > > > Diffs > ----- > > > sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/utils/SentryConstants.java > d8c1061d3 > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/QueryParamBuilder.java > f5802d701 > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java > e2d6c85ac > > sentry-service/sentry-service-server/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java > ca8c41610 > > > Diff: https://reviews.apache.org/r/69530/diff/4/ > > > Testing > ------- > > $ mvn -f sentry-service/sentry-service-server/pom.xml test > -Dtest=TestNotificationProcessor > > > Thanks, > > Arjun Mishra > >