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

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

commit df8bebb153706eb7306cabebf9b8d518c26bfde7
Author: Amruth S <79594127+amruth-git...@users.noreply.github.com>
AuthorDate: Wed May 7 09:23:40 2025 +0530

    ATLAS-5025: entity-create perf improvement - skip setLabel call when empty 
(#339)
    
    (cherry picked from commit 527ff208403715ad60cce5d1b6ea554c9c596867)
---
 .../org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
index 63a4b3a92..5cd382817 100644
--- 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
@@ -336,7 +336,9 @@ public class EntityGraphMapper {
 
         setCustomAttributes(ret, entity);
 
-        setLabels(ret, entity.getLabels());
+        if (CollectionUtils.isNotEmpty(entity.getLabels())) {
+            setLabels(ret, entity.getLabels());
+        }
 
         GraphTransactionInterceptor.addToVertexCache(guid, ret);
 

Reply via email to