----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56102/#review163592 -----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/graph/GraphToTypedInstanceMapper.java (line 75) <https://reviews.apache.org/r/56102/#comment235064> Is it a good idea to make the repository aware of the RequestContext ? IMO any submodule shouldn't rely on the information from request context, rather there should be another way of trickling down that info to the required module/code. Don't have any implementation ideas at the top of my head though. - Apoorv Naik On Jan. 30, 2017, 10:42 p.m., Jeff Hagelberg wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/56102/ > ----------------------------------------------------------- > > (Updated Jan. 30, 2017, 10:42 p.m.) > > > Review request for atlas and David Kantor. > > > Bugs: ATLAS-1388 > https://issues.apache.org/jira/browse/ATLAS-1388 > > > Repository: atlas > > > Description > ------- > > Cache created entities in RequestContext when they are created. > Update/refactor DefaultMetadataService.loadEntities() to use the cached > created entities. > Use the cache in the following places: > FullTextMapper > DefaultMetadataService.onEntitiesAdded - check cache before calling > DefaultMetadataService.loadEntities > DefaultMetadataService.onEntitiesUpdated - check cache before calling > DefaultMetadataService.loadEntities > EntityResource.getEntityDefinition - check cache before calling > DefaultMetadataService.getEntityDefinition > EntityResource.getResponse - check cache before calling > DefaultMetadataService.getEntityDefinition > > > Diffs > ----- > > > repository/src/main/java/org/apache/atlas/discovery/graph/DefaultGraphPersistenceStrategy.java > f4d8f00da863deeb98209aec2dfc4ccb22734cfa > > repository/src/main/java/org/apache/atlas/repository/graph/FullTextMapper.java > 5be8d0bc349294dc4340ffe5831bfb1265825ed8 > > repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java > be02891cad3020e50d5244fd2aaf3c4af3a5954f > > repository/src/main/java/org/apache/atlas/repository/graph/GraphToTypedInstanceMapper.java > 7b2b753b930467e015d364819c5baa983fce0cf8 > > repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java > bae8b2ac0cae6bf6392f91f24030d81089ae660b > repository/src/test/java/org/apache/atlas/TestUtils.java > cda9eac38861fd55c1494d6d90b5e750e6133545 > > repository/src/test/java/org/apache/atlas/discovery/GraphBackedDiscoveryServiceTest.java > f2ca6a8fb1573755d16497236358358a07881e9c > > repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java > 9e850a9dc0ac122cf3fcdbf7df72a93643abc98d > > repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryTest.java > 7444bf38834f59454d67cf763c932d665d7ef31c > > repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java > c902f8126f6b516e84ab9d89b0ec80ac8ed819fd > > repository/src/test/java/org/apache/atlas/service/DefaultMetadataServiceTest.java > aa1cdaa7848aeb767725b3161ccd904c8750536f > > repository/src/test/java/org/apache/atlas/util/CompiledQueryCacheKeyTest.java > c926f4d7d793ef095b20853277f3ba979483e039 > server-api/src/main/java/org/apache/atlas/RequestContext.java > 651a71dc238a3adaac9504a77ba439785fa07ca8 > > Diff: https://reviews.apache.org/r/56102/diff/ > > > Testing > ------- > > Ran full build, no regresssions found. > > > Thanks, > > Jeff Hagelberg > >