[ https://issues.apache.org/jira/browse/FLINK-5891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15879742#comment-15879742 ]
Xingcan Cui edited comment on FLINK-5891 at 2/23/17 5:38 AM: ------------------------------------------------------------- Hi Greg, may I ask what does "when object reuse enabled" mean here? Is it necessary to make a copy of the attribute min before storing it? I got it here. :) [https://ci.apache.org/projects/flink/flink-docs-release-1.2/dev/batch/index.html#operating-on-data-objects-in-functions] Is it safe to store the value wrapped in a message? was (Author: xccui): Hi Greg, may I ask what does "when object reuse enabled" mean here? Is it necessary to make a copy of the attribute min before storing it? I got it here. :) [https://ci.apache.org/projects/flink/flink-docs-release-1.2/dev/batch/index.html#operating-on-data-objects-in-functions] > ConnectedComponents is broken when object reuse enabled > ------------------------------------------------------- > > Key: FLINK-5891 > URL: https://issues.apache.org/jira/browse/FLINK-5891 > Project: Flink > Issue Type: Bug > Components: Gelly > Affects Versions: 1.3.0 > Reporter: Greg Hogan > > {{org.apache.flink.graph.library.ConnectedComponents.CCUpdater#updateVertex}} > is storing a value from its iterator. > {{GSAConnectedComponents}} does not have this limitation. > {code} > public static final class CCUpdater<K, VV extends Comparable<VV>> > extends GatherFunction<K, VV, VV> { > @Override > public void updateVertex(Vertex<K, VV> vertex, > MessageIterator<VV> messages) throws Exception { > VV current = vertex.getValue(); > VV min = current; > for (VV msg : messages) { > if (msg.compareTo(min) < 0) { > min = msg; > } > } > if (!min.equals(current)) { > setNewVertexValue(min); > } > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)