Bolke de Bruin created ATLAS-3368: ------------------------------------- Summary: 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
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 (v7.6.14#76016)