Open
Description
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:
- Run the following query:
MATCH (t:Thing{uuid:"tosho"})
MATCH (g:Thing{uuid:"gosho"})
MERGE (t)-[fr:FRIEND]->(g)
- 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;
- Then, find the transaction's queryId
call dbms.listTransactions()
- 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.