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

Hudson commented on AMBARI-17820:
---------------------------------

FAILURE: Integrated in Ambari-trunk-Commit #5349 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/5349/])
AMBARI-17820. UI sometimes stucks while deleting service due to JS (jaimin: 
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=1e252acf8d7e33bcb3cab83feedc2e6f3d1f1163])
* ambari-web/app/views/main/service/info/summary.js


> UI sometimes stucks while deleting service due to JS error
> ----------------------------------------------------------
>
>                 Key: AMBARI-17820
>                 URL: https://issues.apache.org/jira/browse/AMBARI-17820
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-web
>    Affects Versions: 2.4.0
>            Reporter: Jaimin D Jetly
>            Assignee: Jaimin D Jetly
>            Priority: Critical
>             Fix For: 2.4.0
>
>         Attachments: AMBARI-17820.1.patch
>
>
> Patch includes following change:
> {code}
> sourceIds.forEach(function(item, index) {
>          if (!dataIds.contains(item)) {
> -          source.removeAt(index);
> +          var sourceItem = source.findProperty('id',item);
> +          source.removeObject(sourceItem);
>          }
>        });
> {code}
> The issue was because sourceIds array being iterated was assumed to have same 
> length as source array whose elements are being conditionally removed.
> The bug was that when condition was satisfied and an element was removed, 
> source array became smaller and its elements were shifted left due to element 
> removal. This made possibility that on last iteration of the loop if the 
> condition to remove element is again satisfied then source array will not 
> have element on the index. So source.removeAt(index); will throw no element 
> at index exception



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to