Github user manuzhang commented on a diff in the pull request:
https://github.com/apache/incubator-gearpump/pull/223#discussion_r138875669
--- Diff: core/src/main/scala/org/apache/gearpump/util/Graph.scala ---
@@ -165,7 +181,7 @@ class Graph[N, E](vertexList: List[N], edgeList:
List[(N, E, N)]) extends Serial
* edges connected to node
*/
def edgesOf(node: N): List[(N, E, N)] = {
- (incomingEdgesOf(node) ++ outgoingEdgesOf(node)).toSet[(N, E,
N)].toList.sortBy(_indexs(_))
+ (incomingEdgesOf(node) ++
outgoingEdgesOf(node)).distinct.sortBy(_indexs(_))
--- End diff --
why do we need to `distinct` and `sort` here ?
---