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

committing delete query throws UNKNOWN #4447

Closed
sorsaffari opened this issue Oct 9, 2018 · 16 comments
Closed

committing delete query throws UNKNOWN #4447

sorsaffari opened this issue Oct 9, 2018 · 16 comments

Comments

@sorsaffari
Copy link

sorsaffari commented Oct 9, 2018

Grakn version: 1.5.0-SNAPSHOT

Expected output:

>>> match $pr isa protein has name "ORM1-like protein 3"; $sourcing ($pr) isa sourcing-of-information; delete $sourcing;
{V1032224, V73928}
>>> commit
>>>

Actual output

>>> match $pr isa protein has name "ORM1-like protein 3"; $sourcing ($pr) isa sourcing-of-information; delete $sourcing;
{V1032224, V73928}
>>> commit
UNKNOWN: Vertex with id 1032224 was removed.. Please check server logs for the stack trace.
>>>

Reproducing

git clone git@github.com:sorsaffari/biograkn.git
cd biograkn/blast
git checkout --track origin/blast-example
path/to/grakn-core-1.5.0-SNAPSHOT/graql console -k proteins -f schema.gql
pip3 install grakn
pip3 install biopython
python3 migrate.py
python3 blast.py
wait for blast output to be imported
enter 0 for all questions (cleaning data) > this is actually where the bug was identified. selecting a protein number from the list, throws the error in question.
path/to/grakn-core-1.5.0-SNAPSHOT/graql console -k proteins
>>> match $pr isa protein has name "ORM1-like protein 3"; $sourcing ($pr) isa sourcing-of-information; delete $sourcing;
{V1032224, V73928}
>>> commit
@sorsaffari
Copy link
Author

@lolski just to give you some context on how the BLAST example(and its timeline) is associated with this bug: the part of the BLAST code that is blocked by this, is not the main part of the code and can be left out till this bug is fixed.

We're planning to:

  • publish the blog post and the example code on Friday (12th October).
  • present the work on BLAST <> Grakn in a meetup on (18th October).

If you've too much on your hand, it's completely fine. we don't have to have that part of the BLAST example for these 2 milestones.

@BFergerson
Copy link
Contributor

Just ran into this exact issue. Is there a workaround for this or do deletes just not work in Grakn 1.4.2?

@lolski
Copy link
Member

lolski commented Nov 13, 2018

Can you post the reproducible step using your data and query, @BFergerson ? Is it deterministic or non-deterministic?

It's always good to have more data.

@BFergerson
Copy link
Contributor

BFergerson commented Nov 13, 2018

@lolski, sure thing. Please check out this branch: https://github.com/bfergerson/grakn-calendar-test/tree/delete-test

Running it causes:

Ontology setup
Most recent thing inserted: [[$d/V16480][$m/V36880][$t/V28712]]
Most recent thing inserted: [[$d/V16480][$m/V20600][$t/V24688]]
Inserted things
Exception in thread "main" java.lang.RuntimeException: UNKNOWN: Vertex with id 36880 was removed.. Please check server logs for the stack trace.
	at ai.grakn.client.Grakn$Transaction.responseOrThrow(Grakn.java:218)
	at ai.grakn.client.Grakn$Transaction.commit(Grakn.java:228)
	at ai.grakn.GraknTx$commit$0.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
	at GraknCalendarTest.main(GraknCalendarTest.groovy:41)

Process finished with exit code 1

@lolski
Copy link
Member

lolski commented Nov 15, 2018

@BFergerson thanks, we will have a look at it.

@BFergerson
Copy link
Contributor

@haikalpribadi, noticed you pushed this back to 1.6. Does that mean that delete queries won't in Grakn 1.5 as well?

@haikalpribadi
Copy link
Member

I actually haven't had a chance to look into this, @BFergerson. All the unresolved issues from 1.5 milestone were moved to 1.6 in batch. Is this something critical in your current usage?

@flyingsilverfin can you help look into this issue?

@BFergerson
Copy link
Contributor

@haikalpribadi, it would definitely be nice to have. I've been wanting to bring the next iteration of GitDetective and the new model (discussed it here https://discuss.grakn.ai/t/modeling-time-based-graphs-in-grakn/996) would require deleting relationships.

@haikalpribadi
Copy link
Member

Alright, we'll look into it this week, @BFergerson ! :)

@flyingsilverfin
Copy link
Member

So I've tried to reproduce @BFergerson nice small example - migrated to a relatively current version of 1.5 that we're close to releasing in a new repository (https://github.com/flyingsilverfin/grakn-debug/tree/master/delete-failure-brandon). I ran the test and it does not fail.

@BFergerson you can try to update to 1.5 a bit early and build it directly, or wait a week and confirm it fixes your bug, and if not we can take look at it again and try to fix it for 1.5.1?

@flyingsilverfin
Copy link
Member

@sorsaffari is going to check if the delete bug from Biograkn also disappears when using a current 1.5 server as well :)

@flyingsilverfin
Copy link
Member

flyingsilverfin commented Mar 18, 2019

@BFergerson seems like it is happening in BioGrakn - will investigate further!

@BFergerson
Copy link
Contributor

BFergerson commented Mar 18, 2019

@flyingsilverfin, thanks for looking into this. Out of curiosity, how would I download an early build of Grakn 1.5? Is that the master branch?

@haikalpribadi
Copy link
Member

Yes, @BFergerson. Just clone master and follow the build instruction here: https://github.com/graknlabs/grakn#compiling-grakn-core-from-source

flyingsilverfin added a commit that referenced this issue Mar 20, 2019
## What is the goal of this PR?
Prevent Grakn from failing when deleting inferred concepts (specifically found to fail when deleting inferred relationships)

Closes #4447 

## What are the changes implemented in this PR?
Add a small `if` check during the delete process of a concept so that it is silently skipped if deleting an inferred concept.
@flyingsilverfin
Copy link
Member

@BFergerson I've fixed the original BioGrakn issue, which stemmed from trying to delete inferred concepts - please open a new issue if you keep having issues!

@haikalpribadi haikalpribadi modified the milestones: v1.6, v1.5 Mar 20, 2019
@haikalpribadi
Copy link
Member

Don't forget to move an issue to the correct milestone when you close it (and it wasn't originally in the correct one), @flyingsilverfin - thanks!

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

No branches or pull requests

6 participants