This is an automated email from the ASF dual-hosted git repository.

amestry pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/master by this push:
     new f912aa8  ATLAS-3050: DataAccess Save error handling. Picked from 
branch-0.8.
f912aa8 is described below

commit f912aa89901d748df0f31d5c7d411b69a709670d
Author: Ashutosh Mestry <[email protected]>
AuthorDate: Mon Aug 5 11:28:14 2019 -0700

    ATLAS-3050: DataAccess Save error handling. Picked from branch-0.8.
---
 .../main/java/org/apache/atlas/repository/ogm/DataAccess.java    | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git 
a/repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java 
b/repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java
index f2df179..f902b2a 100644
--- a/repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java
+++ b/repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java
@@ -72,10 +72,6 @@ public class DataAccess {
             AtlasEntityWithExtInfo entityWithExtInfo      = 
dto.toEntityWithExtInfo(obj);
             EntityMutationResponse entityMutationResponse = 
entityStore.createOrUpdate(new AtlasEntityStream(entityWithExtInfo), false);
 
-            if (noEntityMutation(entityMutationResponse)) {
-                throw new 
AtlasBaseException(AtlasErrorCode.DATA_ACCESS_SAVE_FAILED, obj.toString());
-            }
-
             // Update GUID assignment for newly created entity
             if 
(CollectionUtils.isNotEmpty(entityMutationResponse.getCreatedEntities())) {
                 String assignedGuid = 
entityMutationResponse.getGuidAssignments().get(obj.getGuid());
@@ -263,8 +259,5 @@ public class DataAccess {
         }
     }
 
-    // Helper functions
-    private boolean noEntityMutation(EntityMutationResponse er) {
-        return er == null || (CollectionUtils.isEmpty(er.getCreatedEntities()) 
&& CollectionUtils.isEmpty(er.getUpdatedEntities()));
-    }
+
 }

Reply via email to