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

madhan 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 826f32da1 ATLAS-5024: Improve fetching edges of the vertex (#338)
826f32da1 is described below

commit 826f32da1cfbef3674c8c5971ca2c8cc2a5e8e82
Author: Amruth-github <79594127+amruth-git...@users.noreply.github.com>
AuthorDate: Mon Apr 28 21:20:12 2025 +0530

    ATLAS-5024: Improve fetching edges of the vertex (#338)
    
    Co-authored-by: amruth <amrut...@cloudera.com>
---
 .../java/org/apache/atlas/repository/graph/GraphHelper.java | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git 
a/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 
b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
index ea73b03bb..42db48b0d 100755
--- 
a/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
@@ -1142,14 +1142,13 @@ public final class GraphHelper {
 
         for (int numRetries = 0; numRetries < maxRetries; numRetries++) {
             try {
-                LOG.debug("Running edge creation attempt {}", numRetries);
-
-                if (inVertex.hasEdges(AtlasEdgeDirection.IN, edgeLabel) && 
outVertex.hasEdges(AtlasEdgeDirection.OUT, edgeLabel)) {
-                    AtlasEdge edge = graph.getEdgeBetweenVertices(outVertex, 
inVertex, edgeLabel);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Running edge creation attempt {}", numRetries);
+                }
 
-                    if (edge != null) {
-                        return edge;
-                    }
+                AtlasEdge edge = graph.getEdgeBetweenVertices(outVertex, 
inVertex, edgeLabel);
+                if (edge != null) {
+                    return edge;
                 }
 
                 return addEdge(outVertex, inVertex, edgeLabel);

Reply via email to