sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From linaataus...@apache.org
Subject sentry git commit: Revert "SENTRY-2184: Performance Issue: MPath is queried for each MAuthzPathsMapping in full snapshot (Na Li, reviewed by Brian Towles)"
Date Tue, 20 Mar 2018 15:47:19 GMT
Repository: sentry
Updated Branches:
  refs/heads/master 0ec31c0f7 -> a8646b256


Revert "SENTRY-2184: Performance Issue: MPath is queried for each MAuthzPathsMapping in full
snapshot (Na Li, reviewed by Brian Towles)"

This reverts commit 0ec31c0f786a4c8eaca3901eb716297f74cab4ea.


Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/a8646b25
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/a8646b25
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/a8646b25

Branch: refs/heads/master
Commit: a8646b256a85d0b4a42dfdbf69288bf84e3583cb
Parents: 0ec31c0
Author: lina.li <lina.li@cloudera.com>
Authored: Tue Mar 20 10:46:02 2018 -0500
Committer: lina.li <lina.li@cloudera.com>
Committed: Tue Mar 20 10:46:02 2018 -0500

----------------------------------------------------------------------
 .../org/apache/sentry/provider/db/service/model/package.jdo | 6 ------
 .../sentry/provider/db/service/persistent/SentryStore.java  | 9 +--------
 2 files changed, 1 insertion(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/a8646b25/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo
index ebfb191..d883c51 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo
@@ -267,9 +267,6 @@
              <column name="AUTHZ_OBJ_ID"/>
            </element>
        </field>
-       <fetch-group name="includingPaths">
-         <field name="paths"/>
-       </fetch-group>
        <field name="authzSnapshotID">
          <column name="AUTHZ_SNAPSHOT_ID" jdbc-type="BIGINT" allows-null="false"/>
        </field>
@@ -282,9 +279,6 @@
       <field name="path">
         <column name="PATH_NAME" length="4000" jdbc-type="VARCHAR"/>
       </field>
-      <fetch-group name="includingPath">
-        <field name="path"/>
-      </fetch-group>
     </class>
 
      <class name="MSentryPermChange" table="SENTRY_PERM_CHANGE" identity-type="application"
detachable="true">

http://git-wip-us.apache.org/repos/asf/sentry/blob/a8646b25/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
index d1f71d2..4521ad4 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
@@ -2605,15 +2605,8 @@ public class SentryStore {
     query.addExtension(LOAD_RESULTS_AT_COMMIT, "false");
     query.setFilter("this.authzSnapshotID == currentSnapshotID");
     query.declareParameters("long currentSnapshotID");
-
-    // Get path in batch to improve performance. The fectch groups are defined in package.jdo
-    pm.getFetchPlan().addGroup("includingPaths");
-    pm.getFetchPlan().addGroup("includingPath");
-    int originalMaxFetchDepth = pm.getFetchPlan().getMaxFetchDepth();
-    pm.getFetchPlan().setMaxFetchDepth(2);
     Collection<MAuthzPathsMapping> authzToPathsMappings =
-        (Collection<MAuthzPathsMapping>) query.execute(currentSnapshotID);
-    pm.getFetchPlan().setMaxFetchDepth(originalMaxFetchDepth);
+            (Collection<MAuthzPathsMapping>) query.execute(currentSnapshotID);
 
     // Walk each MAuthzPathsMapping object, get set of paths and push them all
     // into HMSPaths object contained in UpdateableAuthzPaths.


Mime
View raw message