[ 
https://issues.apache.org/jira/browse/ATLAS-2531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Keval Bhatt updated ATLAS-2531:
-------------------------------
    Fix Version/s: 0.8.3
                   1.0.0

> Lineage display is causing "Maximum call stack size reached" in underscore.js
> -----------------------------------------------------------------------------
>
>                 Key: ATLAS-2531
>                 URL: https://issues.apache.org/jira/browse/ATLAS-2531
>             Project: Atlas
>          Issue Type: Bug
>         Environment: Apache Atlas 0.8.2
>            Reporter: Connie Chen
>            Assignee: Keval Bhatt
>            Priority: Major
>             Fix For: 1.0.0, 0.8.3
>
>         Attachments: ATLAS-2531.patch
>
>
> I am getting this console error when I try to display a Dataset entity with 
> lineage:
> {code:java}
> Uncaught RangeError: Maximum call stack size exceeded
>  at underscore-min.js?bust=1519685834833:1
>  at underscore-min.js?bust=1519685834833:1
>  at Function.s.each.s.forEach (underscore-min.js?bust=1519685834833:1)
>  at Function.s.filter.s.select (underscore-min.js?bust=1519685834833:1)
>  at Function.s.where (underscore-min.js?bust=1519685834833:1)
>  at N.d.checkForLineageOrImpactFlag 
> (LineageLayoutView.js?bust=1519685834833:80)
>  at LineageLayoutView.js?bust=1519685834833:94
>  at Function.s.each.s.forEach (underscore-min.js?bust=1519685834833:1)
>  at N.d.checkForLineageOrImpactFlag 
> (LineageLayoutView.js?bust=1519685834833:83)
>  at LineageLayoutView.js?bust=1519685834833:94{code}
> When I query the API for the lineage information, it comes back properly with 
> all the relations.
> For example
> {code:java}
> curl 
> http://localhost:21000/api/atlas/v2/lineage/83bfe9ec-88d3-4207-9b84-26f1018f6a70{code}
> And in the response body I see:
> {code:java}
> "relations":[{"fromEntityId":"b3b83e14-0eda-4fe0-ad94-2d6b5fd02aae","toEntityId":"602a8817-31d9-44ea-98af-8448f8701e86"},{"fromEntityId":"470fc824-faab-41dc-9794-67beee1b0d5f","toEntityId":"0d363cf3-e786-4563-bd86-ce82a75608c6"},{"fromEntityId":"5b78dc92-7232-4428-85a5-f4c950667d63","toEntityId":"ada1c08e-7684-4eaa-97d8-387f5ab3e8e2"},{"fromEntityId":"0d363cf3-e786-4563-bd86-ce82a75608c6","toEntityId":"3a65d3f1-a44b-4237-a7c6-e31057bcfac8"},{"fromEntityId":"7b45090c-5cf1-4d8b-a861-5abaa7593b02","toEntityId":"0d363cf3-e786-4563-bd86-ce82a75608c6"},{"fromEntityId":"5b78dc92-7232-4428-85a5-f4c950667d63","toEntityId":"7b45090c-5cf1-4d8b-a861-5abaa7593b02"},{"fromEntityId":"3a65d3f1-a44b-4237-a7c6-e31057bcfac8","toEntityId":"b3b83e14-0eda-4fe0-ad94-2d6b5fd02aae"},{"fromEntityId":"83bfe9ec-88d3-4207-9b84-26f1018f6a70","toEntityId":"5b78dc92-7232-4428-85a5-f4c950667d63"},{"fromEntityId":"ada1c08e-7684-4eaa-97d8-387f5ab3e8e2","toEntityId":"0d363cf3-e786-4563-bd86-ce82a75608c6"},{"fromEntityId":"5b78dc92-7232-4428-85a5-f4c950667d63","toEntityId":"470fc824-faab-41dc-9794-67beee1b0d5f"},{"fromEntityId":"5b78dc92-7232-4428-85a5-f4c950667d63","toEntityId":"602a8817-31d9-44ea-98af-8448f8701e86"},{"fromEntityId":"5b78dc92-7232-4428-85a5-f4c950667d63","toEntityId":"9aeab707-c558-4726-a502-0872023a7dde"},{"fromEntityId":"9aeab707-c558-4726-a502-0872023a7dde","toEntityId":"0d363cf3-e786-4563-bd86-ce82a75608c6"},{"fromEntityId":"602a8817-31d9-44ea-98af-8448f8701e86","toEntityId":"0d363cf3-e786-4563-bd86-ce82a75608c6"}]}{code}
> So there should be ~14 relations that show up for this entity in the lineage 
> graph. 
> From what I can tell this recursive function is not terminating properly:
> [https://github.com/apache/atlas/blob/2735f96fc70f06eba4672538376c6df8f0dc30dd/dashboardv2/public/js/views/graph/LineageLayoutView.js#L158]
> I am guessing that since it is traversing the relations of every 
> `fromEntityId`, at some point it is going to re-visit a node that lineage is 
> already drawn for, therefore causing a circular dependency and recursing 
> forever. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to