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

Bug: /db/data/cypher doesn't return error for failed deletion #2197

Closed
aseemk opened this issue Mar 30, 2014 · 2 comments
Closed

Bug: /db/data/cypher doesn't return error for failed deletion #2197

aseemk opened this issue Mar 30, 2014 · 2 comments

Comments

@aseemk
Copy link

aseemk commented Mar 30, 2014

Though the new /db/data/transaction/commit endpoint does. Neo4j 2.0.1.

Setup: create a node that's connected to one or more other nodes. Mine happens to be labeled User.

Here's the Cypher query I'm running to attempt to delete this node while it's still connected to others:

MATCH (user:User)
WHERE ID(user) = {id}
DELETE user

If I simply paste this into the Neo4j browser (replacing {id}), I properly get back an error:

javax.transaction.HeuristicRollbackException: Failed to commit transaction Transaction(633, owner:"qtp841090834-124")[STATUS_NO_TRANSACTION,Resources=1], transaction rolled back ---> javax.transaction.xa.XAException
Neo.DatabaseError.Transaction.CouldNotCommit

And I can replicate this by going to the underlying transaction endpoint myself:

:POST /db/data/transaction/commit {"statements": [{"statement": "MATCH (user:User) WHERE ID(user) = {id} DELETE user", "parameters": {"id": 63}}]}

But if I go to the old(er) Cypher endpoint, it claims to succeed:

:POST /db/data/cypher {"query": "MATCH (user:User) WHERE ID(user) = {id} DELETE user", "params": {"id": 63}}
{
  "columns": [],
  "data": []
}

Is this a known issue with Neo4j 2.0? Is the old /db/data/cypher endpoint beyond deprecated and known to actually not work in some cases? Or is this just a bug that just slipped through the cracks?

Thanks!

@freeeve
Copy link
Contributor

freeeve commented Mar 31, 2014

I vote bug.

@technige
Copy link
Contributor

Closing as this only applies to a deprecated endpoint.

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

5 participants