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

Inserting and Deleting a Relation in the same Transaction fails #5107

Closed
flyingsilverfin opened this issue Apr 11, 2019 · 1 comment · Fixed by #5121
Closed

Inserting and Deleting a Relation in the same Transaction fails #5107

flyingsilverfin opened this issue Apr 11, 2019 · 1 comment · Fixed by #5121

Comments

@flyingsilverfin
Copy link
Member

flyingsilverfin commented Apr 11, 2019

Description

Inserting and deleting a relation in the same transaction throws an error such as:
UNKNOWN: Vertex with id 4344 was removed..

Environment

Grakn Core 1.5 (any current master should fail)

Reproducible Steps

In console:

  1. define person sub entity, plays friend; friendship sub relation, relates friend;
  2. commit
  3. insert $x isa person; $y isa person; $r (friend: $x, friend: $y) isa friendship;
  4. collect ID of $r above -- match $r id <R ID>; delete $r;
  5. commit

Expected Output

Should insert $x and $y but not the friendship

Actual Output

UNKNOWN: Vertex with id 4344 was removed..

Additional information

Investigation pins this down to the two implementations of relation - Relation and RelationReified. These interact badly with the TransactionCache... the inserted friendship goes into TransactionCache.newRelations, but when deleting $r, this is a RelationReified and does not remove concepts from newRelations.

A proper fix would fix the concept hierarchy and where RelationReified fits into it.

Flagged up by #4447 and #5084

@flyingsilverfin flyingsilverfin added this to the 1.6.0 milestone Apr 11, 2019
@flyingsilverfin
Copy link
Member Author

@kasper-piskorski

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

Successfully merging a pull request may close this issue.

3 participants