----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72993/#review222139 -----------------------------------------------------------
repository/src/main/java/org/apache/atlas/GraphTransactionInterceptor.java Line 120 (original), 137 (patched) <https://reviews.apache.org/r/72993/#comment311201> Duplicate code: Use clearCache. repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2Test.java Line 860 (original), 861 (patched) <https://reviews.apache.org/r/72993/#comment311202> fyi: Since we use different DI mechanisms in test and regular code, the annotation does not get applied, because of which the finally block within _GraphTransactionInterceptor_ does not get called, hence explict call. The test executes fine since everything happens in same txn. - Ashutosh Mestry On Oct. 28, 2020, 1:59 p.m., Nikhil Bonte wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72993/ > ----------------------------------------------------------- > > (Updated Oct. 28, 2020, 1:59 p.m.) > > > Review request for atlas, Ashutosh Mestry, Jayendra Parab, madhan, Nixon > Rodrigues, Sarath Subramanian, and Sidharth Mishra. > > > Bugs: ATLAS-4008 > https://issues.apache.org/jira/browse/ATLAS-4008 > > > Repository: atlas > > > Description > ------- > > Problem Statement: > > GraphHelper.getGuid() & GraphHelper.getStatus() causes overhead when called > multiple times in a same request. > > > > Approach: > > Implement a caching mechanism in GraphTransactionInterceptor to cache the > following mappings: > > vertexID -> guid > > vertexID -> entityStatus > > > Diffs > ----- > > repository/src/main/java/org/apache/atlas/GraphTransactionInterceptor.java > 57e454a8e > repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java > ca46d0fdb > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java > 9360dd3c9 > > repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java > ad5fa92bd > > repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2Test.java > b9cbef1b0 > > > Diff: https://reviews.apache.org/r/72993/diff/1/ > > > Testing > ------- > > PC build : > https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/164/console > - In progress > > > Thanks, > > Nikhil Bonte > >