Long running test - RemoveEdges never called

Summary: RemoveEdges is an extremely slow operation because it iterates over all the vertices to find the appropriate edge. It kind of messes up the DB usage. This diff stops it ever getting called, but does not delete the function. We might want it to happen **very rarely**, but it's probably best never to call it.

Reviewers: buda, mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D910
This commit is contained in:
florijan 2017-10-17 11:15:36 +02:00
parent 8210d44c47
commit 5525af558b

View File

@ -329,14 +329,9 @@ class GraphSession {
}
}
// prefer adding/removing edges whenever there is an edge
// disbalance and there is enough vertices
if (ratio_v > 0.5 && std::fabs(1.0 - ratio_e) > 0.2) {
if (Bernoulli(ratio_e / 2.0)) {
RemoveEdge();
} else {
CreateEdge();
}
// if we're missing edges (due to vertex detach delete), add some!
if (Bernoulli(ratio_e < 0.9)) {
CreateEdge();
continue;
}