----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72512/#review220770 -----------------------------------------------------------
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java Line 177 (original), 179 (patched) <https://reviews.apache.org/r/72512/#comment309462> As we are not returning ret, please rename this to something more meaningful like gremlinEdge ( As we are trying to find the gremlinEdge here) graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java Lines 183 (patched) <https://reviews.apache.org/r/72512/#comment309461> Kindly change this to somthing like below as second ret.property(STATE_PROPERTY_KEY).isPresent() check is not rquired: if (ret != null && (!ret.property(STATE_PROPERTY_KEY).isPresent() || ret.property(STATE_PROPERTY_KEY).value().equals(AtlasEntity.Status.ACTIVE.toString())) graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java Lines 195 (patched) <https://reviews.apache.org/r/72512/#comment309463> Just to avoid two returns statement as we do other places in atlas, we can do something like: Initialize variable AtlasEdge ret = null; At 192 line: ret = GraphDbObjectFactory.createEdge(this, ret); At the end return ret; - Sidharth Mishra On May 14, 2020, 6:19 p.m., Ashutosh Mestry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72512/ > ----------------------------------------------------------- > > (Updated May 14, 2020, 6:19 p.m.) > > > Review request for atlas. > > > Bugs: ATLAS-3797 > https://issues.apache.org/jira/browse/ATLAS-3797 > > > Repository: atlas > > > Description > ------- > > **Approach** > Modified: _GraphHelper.getOrCreateEdge_ to use > _AtlasJanusGraph.getEdgeBetweenVertices_. > Modified: _AtlasJanusGraph.getEdgeBetweenVertices_ modified fetch. > > > Diffs > ----- > > > graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java > 35274c9d1 > repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java > b1368e5e9 > > > Diff: https://reviews.apache.org/r/72512/diff/1/ > > > Testing > ------- > > **Pre-commit** > https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1896/ > > **Volume test** > Case edge creation involves existing entity where large number of existing > edges (200K), this change shows significant improvement. > > > Thanks, > > Ashutosh Mestry > >