You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by am...@apache.org on 2018/11/07 19:08:23 UTC

atlas git commit: ATLAS-2956: Clearing RequestContext during BulkImport.

Repository: atlas
Updated Branches:
  refs/heads/branch-0.8 d9417d82a -> ae6cb093b


ATLAS-2956: Clearing RequestContext during BulkImport.


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

Branch: refs/heads/branch-0.8
Commit: ae6cb093b97b0059b79404546aa251ca4f42e305
Parents: d9417d8
Author: Ashutosh Mestry <am...@hortonworks.com>
Authored: Tue Nov 6 14:29:53 2018 -0800
Committer: Ashutosh Mestry <am...@hortonworks.com>
Committed: Wed Nov 7 11:08:06 2018 -0800

----------------------------------------------------------------------
 .../atlas/repository/store/graph/v1/BulkImporterImpl.java       | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/ae6cb093/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/BulkImporterImpl.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/BulkImporterImpl.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/BulkImporterImpl.java
index 62b393a..a60636e 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/BulkImporterImpl.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/BulkImporterImpl.java
@@ -19,6 +19,8 @@ package org.apache.atlas.repository.store.graph.v1;
 
 import com.google.common.annotations.VisibleForTesting;
 import org.apache.atlas.AtlasErrorCode;
+import org.apache.atlas.RequestContext;
+import org.apache.atlas.RequestContextV1;
 import org.apache.atlas.exception.AtlasBaseException;
 import org.apache.atlas.model.impexp.AtlasImportResult;
 import org.apache.atlas.model.instance.AtlasEntity;
@@ -98,6 +100,9 @@ public class BulkImporterImpl implements BulkImporter {
                 if (!updateResidualList(abe, residualList, entityWithExtInfo.getEntity().getGuid())) {
                     throw abe;
                 }
+            } finally {
+                RequestContext.clear();
+                RequestContextV1.clear();
             }
         }