Hello,
I am using neo4j ogm 2.0.0-M02 (HTTP driver) with neo4j server enterprise 
2.3.2. I do some tests and it looks that a deadlock issue happens when I 
try to update one node from several threads. My node entity is the 
following:


@NodeEntity
public class Node {
    @GraphId
    Long id;
    String oid;
    int name;

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getOid() { return oid; }
    public void setOid(String oid) { this.oid = oid; }
    public int getName() { return name; }
    public void setName(int name) { this.name = name; }
}

After saving one instance of my Node, I send a cypher request with this 
code:

Transaction tx = session.beginTransaction();
session.query("match(n: `Node` { oid: '100'}) set n.name = 10", 
Collections.EMPTY_MAP);
tx.commit();
tx.close();

Everything works properly. But if I run more than 2 concurrent threads, 
each thread executing the code above, a deadlock happens and the execution 
stays stuck until reaching the transactions timeout. Executing the same 
query without transaction eliminates this issue. Could someone explain me 
this behavior ?

Thanks in advance for your help.
Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to