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

sarath pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


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

commit f21d22e8f2331d2c5bc01da2c7fe36b1202102d4
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.
    
    (cherry picked from commit f912aa89901d748df0f31d5c7d411b69a709670d)
---
 .../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