Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move vertex suddenly drops edges #6789

Closed
lukaszkaleta opened this issue Oct 6, 2016 · 2 comments
Closed

Move vertex suddenly drops edges #6789

lukaszkaleta opened this issue Oct 6, 2016 · 2 comments
Assignees
Labels

Comments

@lukaszkaleta
Copy link

lukaszkaleta commented Oct 6, 2016

2.2.7, Linux ubuntu

Expected behavior and actual behavior

When moving vertex from one class to another I would expect that those edges will not be removed.
This is mine code snippet:
OrientVertex beforeVertex;
OrientVertex afterVertex;
int bofore = beforeVertex.countEdges(Direction.IN, UserVoteOnPickle.LABEL);
activeGraph.command(new OCommandSQL("move vertex #11:545 to class:ExpiredPickle set expiredAt = ?")).execute(new Date());
int after = afterVertex.countEdges(Direction.IN, UserVoteOnPickle.LABEL);

create class User extends V;
create class Pickle extends V;
create class ActivePickle extends Pickle;
create class ExpiredPickle extends Pickle;
create property ExpiredPickle.expiredAt datetime;
create class UserVoteOnPickle extends E;
create property UserVoteOnPickle.out LINK User;
create property UserVoteOnPickle.in LINK Pickle;
ALTER PROPERTY UserVoteOnPickle.out MANDATORY TRUE;
ALTER PROPERTY UserVoteOnPickle.in MANDATORY TRUE;
CREATE INDEX UniqueUserVoteOnPickle ON UserVoteOnPickle(out,in) UNIQUE;

UserVoteOnPickle's are the edges which disappear.

Those are the logs I am getting after executing this code:
2016-10-06 08:03:17,030 INFO [request=] [uid=] [user=] [service=] - Votes count before: 41
2016-10-06 08:03:17,039 INFO [request=] [uid=] [user=] [service=] - Votes count after: 0

2016-10-06 09:33:58,133 INFO [request=] [uid=] [user=] [service=] - Votes count before: 71
2016-10-06 09:33:58,159 INFO [request=] [uid=] [user=] [service=] - Votes count after: 0

2016-10-06 09:53:39,419 INFO [request=] [uid=] [user=] [service=] - Votes count before: 2
2016-10-06 09:53:39,424 INFO [request=] [uid=] [user=] [service=] - Votes count after: 2

2016-10-06 13:21:27,101 INFO [request=] [uid=] [user=] [service=] - Votes count before: 79
2016-10-06 13:21:27,118 INFO [request=] [uid=] [user=] [service=] - Votes count after: 0

Steps to reproduce the problem

I do not know exact steps to reproduce but it seems that it does not work only with large ammount of edges. As you see in mine logs vertex with two edges was able to keep them persited .. but those with more are lost.

Error did not occur with version 2.1, it started to occur after update to 2.2

@luigidellaquila luigidellaquila self-assigned this Oct 7, 2016
@luigidellaquila
Copy link
Member

Hi @lukaszkaleta

I managed to reproduce the problem, I'm on it

Thanks

Luigi

@luigidellaquila
Copy link
Member

Hi @lukaszkaleta

I just pushed a fix for this. The problem was limited to vertices with more that 40 edges (the threshold for RidBag Bonsai implementation)
The fix will be released with 2.2.12

Thanks

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants