[
https://issues.apache.org/jira/browse/FLINK-2527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14698670#comment-14698670
]
ASF GitHub Bot commented on FLINK-2527:
---------------------------------------
GitHub user ggevay opened a pull request:
https://github.com/apache/flink/pull/1027
[FLINK-2527] [gelly] Ensure that VertexUpdateFunction.setNewVertexValue is
called at most once
I implemented (1), with the check to enforce that it is called at most
once. Unfortunately, I had to add exception specification to a number of
methods, and users might also have to do this with already existing code. If
you think this does not worth it, then I can remove the check.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ggevay/flink setNewVertexValueFix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/1027.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1027
----
commit 9b514633d868b28d628785a0d099115134599cee
Author: Gabor Gevay <[email protected]>
Date: 2015-08-16T13:26:59Z
[FLINK-2527] [gelly] Ensure that VertexUpdateFunction.setNewVertexValue is
called at most once per updateVertex
----
> If a VertexUpdateFunction calls setNewVertexValue more than once, the
> MessagingFunction will only see the first value set
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-2527
> URL: https://issues.apache.org/jira/browse/FLINK-2527
> Project: Flink
> Issue Type: Bug
> Components: Gelly
> Reporter: Gabor Gevay
> Assignee: Gabor Gevay
> Fix For: 0.10, 0.9.1
>
>
> The problem is that if setNewVertexValue is called more than once, it sends
> each new value to the out Collector, and these all end up in the workset, but
> then the coGroups in the two descendants of MessagingUdfWithEdgeValues use
> only the first value in the state Iterable. I see three ways to resolve this:
> 1. Add it to the documentation that setNewVertexValue should only be called
> once, and optionally add a check for this.
> 2. In setNewVertexValue, do not send the newValue to the out Collector at
> once, but only record it in outVal, and send the last recorded value after
> updateVertex returns.
> 3. Iterate over the entire Iterable in MessagingUdfWithEVsSimpleVV.coGroup
> and MessagingUdfWithEVsVVWithDegrees.coGroup. (This would probably still need
> some documentation addition.)
> I like 2. the best. What are your opinions?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)