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

Transaction management - 3. Default locking behavior #19

Open
ivanruski opened this issue Feb 22, 2022 · 0 comments
Open

Transaction management - 3. Default locking behavior #19

ivanruski opened this issue Feb 22, 2022 · 0 comments
Labels

Comments

@ivanruski
Copy link

ivanruski commented Feb 22, 2022

Hello,
I am using Neo4j v4.3.10 and according to the docs:

When creating or deleting a relationship a write lock will be taken on the specific relationship and both its nodes.

However I am observing different behavior when deleting a relationship between 2 nodes.

Steps to reproduce:

  1. Run the following query:
MATCH (t:Thing{uuid:"tosho"})
MATCH (g:Thing{uuid:"gosho"})
MERGE (t)-[fr:FRIEND]->(g)
  1. Then
MATCH (t:Thing{uuid:"tosho"})
MATCH (g:Thing{uuid:"gosho"})
MATCH (t)-[fr:FRIEND]->(g)
DELETE fr
WITH t call apoc.util.sleep(200000) RETURN t;
  1. Then, find the transaction's queryId
call dbms.listTransactions()
  1. List the active locks for that query
call dbms.listActiveLocks('query-xxxx')

I am seeing only one EXCLUSIVE lock for the relationship.
"EXCLUSIVE"│"RELATIONSHIP_DELETE" │115762891

The rest of the locks are shared, whereas I am expecting to see 3 EXCLUSIVE locks according to the docs - one for the relationship and 2 for the nodes.

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

No branches or pull requests

2 participants