[ 
https://issues.apache.org/jira/browse/ATLAS-3368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16929783#comment-16929783
 ] 

ASF subversion and git services commented on ATLAS-3368:
--------------------------------------------------------

Commit 3eadf7e875f810713b3a11a8e49ab2054128ac93 in atlas's branch 
refs/heads/master from Bolke de Bruin
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=3eadf7e ]

ATLAS-3368: log warning for references without relationship-def

Signed-off-by: Madhan Neethiraj <mad...@apache.org>


> Very slow creation of entities with referred entities without relationshipDef
> -----------------------------------------------------------------------------
>
>                 Key: ATLAS-3368
>                 URL: https://issues.apache.org/jira/browse/ATLAS-3368
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Bolke de Bruin
>            Priority: Major
>              Labels: performance
>         Attachments: 
> 0001-ATLAS-3368-Set-log-level-to-warn-for-relationships-w.patch
>
>
> If an entity is created that has a definition with a reference to a non built 
> in type, e.g.
> {code:java}
> ,{
> "name" : "server",
> "typeName" : "server",
> "isOptional" : false,
> "cardinality" : "SINGLE",
> "valuesMinCount" : 1,
> "valuesMaxCount" : 1,
> "isUnique" : false,
> "isIndexable" : true
> }{code}
> It will trigger a legacy code path in EntityGraphMapper. This path can take 
> excessive amounts of time:
> {code}2019-08-12 12:10:23,323 DEBUG - [NotificationHookConsumer thread-0:] ~ 
> No RelationshipDef defined between rokku_client and server on attribute: 
> server (EntityGraphMapper:907)
> 2019-08-12 12:10:23,323 DEBUG - [NotificationHookConsumer thread-0:] ~ ==> 
> mapObjectIdValue(org.apache.atlas.repository.store.graph.v2.AttributeMutationContext@3f7c5b66)
>  (EntityGraphMapper:791)
> 2019-08-12 12:10:28,825 DEBUG - [NotificationHookConsumer thread-0:] ~ ==> 
> setProperty(edge[id=v6kwld-biutqg-xel1-x8oqg label=__rokku_client.server from 
> vertex[id=696799240 type=rokku_client 
> guid=30db90a8-8236-41c6-9438-4fa2ec14f349] -> to vertex[id=55832632 
> type=server guid=9144e224-089f-4ae3-83bd-3472175d92a4]], __state, ACTIVE) 
> (AtlasGraphUtilsV2:212)
> 2019-08-12 12:10:23,323 DEBUG - [NotificationHookConsumer thread-0:] ~ ==> 
> mapObjectIdValue(org.apache.atlas.repository.store.graph.v2.AttributeMutationContext@3f7c5b66)
>  (EntityGraphMapper:791)
> 2019-08-12 12:10:28,825 DEBUG - [NotificationHookConsumer thread-0:] ~ ==> 
> setProperty(edge[id=v6kwld-biutqg-xel1-x8oqg label=__rokku_client.server from 
> vertex[id=696799240 type=rokku_client 
> guid=30db90a8-8236-41c6-9438-4fa2ec14f349] -> to vertex[id=55832632 
> type=server guid=9144e224-089f-4ae3-83bd-3472175d92a4]], __state, ACTIVE) 
> (AtlasGraphUtilsV2:212)
> {code}
> Notice the 5 second(!) jump between the last two log lines. At a minimum the 
> log about triggering the legacy code path should be at WARN level and 
> extended with a suggestion to update the definition for better performance.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to