You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Alessandro Presta (JIRA)" <ji...@apache.org> on 2013/06/01 00:00:20 UTC

[jira] [Updated] (GIRAPH-675) Mutable edge iterator gets corrupted by calling vertex.getNumEdges() during iteration

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

Alessandro Presta updated GIRAPH-675:
-------------------------------------

    Attachment: GIRAPH-675.patch

Also added a couple test cases.
                
> Mutable edge iterator gets corrupted by calling vertex.getNumEdges() during iteration
> -------------------------------------------------------------------------------------
>
>                 Key: GIRAPH-675
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-675
>             Project: Giraph
>          Issue Type: Bug
>            Reporter: Alessandro Presta
>            Assignee: Alessandro Presta
>         Attachments: GIRAPH-675.patch
>
>
> This affects the generic implementation of the mutable iterator. When size() is called, we first call unwrap() to move all remaining edges to the new iterator. This clearly breaks if it's called while iterating (it will exhaust the same iterator we're using).
> The fix is to add a numEdges field to MutableEdgesWrapper, which is initialized to the original number of edges, and decremented whenever remove() is called on the mutable iterator.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira