You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by pi...@apache.org on 2026/02/05 09:12:04 UTC

(atlas) branch atlas-2.5 updated: ATLAS-5198: Review and Improve logging of create/update entity flow (#512)

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

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


The following commit(s) were added to refs/heads/atlas-2.5 by this push:
     new 06ae728cf ATLAS-5198: Review and Improve logging of create/update entity flow (#512)
06ae728cf is described below

commit 06ae728cf0e38eed3cd0701f037012562b81984f
Author: Aditya Gupta <ad...@freestoneinfotech.com>
AuthorDate: Thu Feb 5 14:40:30 2026 +0530

    ATLAS-5198: Review and Improve logging of create/update entity flow (#512)
    
    (cherry picked from commit f00d3733ae558a3add3cadf8aafa2ccd7a9feb8c)
---
 intg/src/main/java/org/apache/atlas/AtlasErrorCode.java               | 2 +-
 .../apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java    | 3 +--
 .../atlas/repository/store/graph/v2/AtlasRelationshipStoreV2.java     | 4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java b/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
index 9256d0f88..ff856e497 100644
--- a/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
+++ b/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
@@ -82,7 +82,7 @@ public enum AtlasErrorCode {
     RELATIONSHIPDEF_COMPOSITION_MULTIPLE_PARENTS(400, "ATLAS-400-00-033", "COMPOSITION relationshipDef {0} can only have one parent; so cannot have SET cardinality on children"),
     RELATIONSHIPDEF_LIST_ON_END(400, "ATLAS-400-00-034", "relationshipDef {0} cannot have a LIST cardinality on an end"),
     RELATIONSHIPDEF_INVALID_END_TYPE(400, "ATLAS-400-00-035", "relationshipDef {0} has invalid end type {1}"),
-    INVALID_RELATIONSHIP_END_TYPE(400, "ATLAS-400-00-036", "invalid relationshipDef: {0}: end type 1: {1}, end type 2: {2}"),
+    INVALID_RELATIONSHIP_END_TYPE(400, "ATLAS-400-00-036", "invalid relationshipDef: {0}: actual: [end type 1: {1}, end type 2: {2}]. expected: [end type 1: {3}, end type 2: {4}]"),
     RELATIONSHIPDEF_INVALID_END1_UPDATE(400, "ATLAS-400-00-037", "invalid update for relationshipDef {0}: new end1 {1}, existing end1 {2}"),
     RELATIONSHIPDEF_INVALID_END2_UPDATE(400, "ATLAS-400-00-038", "invalid update for relationshipDef {0}: new end2 {1}, existing end2 {2}"),
     RELATIONSHIPDEF_INVALID_CATEGORY_UPDATE(400, "ATLAS-400-00-039", "invalid  update for relationship {0}: new relationshipDef category {1}, existing relationshipDef category {2}"),
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
index 3dd45f98f..f9b8c36ae 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
@@ -1109,7 +1109,7 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
     }
 
     private EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate, boolean replaceClassifications, boolean replaceBusinessAttributes) throws AtlasBaseException {
-        LOG.debug("==> createOrUpdate()");
+        LOG.debug("==> createOrUpdate(isPartialUpdate={}, replaceClassifications={}, replaceBusinessAttributes={})", isPartialUpdate, replaceClassifications, replaceBusinessAttributes);
 
         if (entityStream == null || !entityStream.hasNext()) {
             throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "no entities to create/update.");
@@ -1303,7 +1303,6 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
         }
 
         RequestContext.get().endMetricRecord(metric);
-
         return context;
     }
 
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreV2.java
index 816f04be0..459fc1da8 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreV2.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreV2.java
@@ -480,7 +480,7 @@ public class AtlasRelationshipStoreV2 implements AtlasRelationshipStore {
         }
 
         if (!validEndTypes) {
-            throw new AtlasBaseException(AtlasErrorCode.INVALID_RELATIONSHIP_END_TYPE, relationshipName, relationshipType.getEnd2Type().getTypeName(), end1TypeName);
+            throw new AtlasBaseException(AtlasErrorCode.INVALID_RELATIONSHIP_END_TYPE, relationshipName, end1TypeName, end2TypeName, relationshipType.getEnd1Type().getTypeName(), relationshipType.getEnd2Type().getTypeName());
         }
 
         validateEnds(relationship);
@@ -517,7 +517,7 @@ public class AtlasRelationshipStoreV2 implements AtlasRelationshipStore {
         }
 
         if (!validEndTypes) {
-            throw new AtlasBaseException(AtlasErrorCode.INVALID_RELATIONSHIP_END_TYPE, relationshipName, relationshipType.getEnd2Type().getTypeName(), end1TypeName);
+            throw new AtlasBaseException(AtlasErrorCode.INVALID_RELATIONSHIP_END_TYPE, relationshipName, end1TypeName, end2TypeName, relationshipType.getEnd1Type().getTypeName(), relationshipType.getEnd2Type().getTypeName());
         }
 
         PropagateTags typePropagation = relationshipType.getRelationshipDef().getPropagateTags();