Thanks Michael.

Sorry I should have been more clear, there is already a Unique constraint 
on the 'type' property. What do you mean by "And only the label from the 
constraint"?


On Friday, 29 August 2014 15:25:35 UTC+1, Michael Hunger wrote:
>
> You need a unique constraint for this to work
>
> And only the label from the constraint
>
>
>
> Sent from mobile device
>
> Am 29.08.2014 um 15:36 schrieb Mark Findlater <mark.fi...@googlemail.com 
> <javascript:>>:
>
> Using Neo4J embedded version 2.1.3 and Spring Data Neo4J 3.1.4.RELEASE and 
> seeing odd behaviour when calling MERGE from multiple threads. Is it 
> expected that concurrent merge operations (with the same values) will 
> result in a single unique node and will operations that use the ON CREATE 
> and ON MATCH constructs acquire a write lock on that node?
>
> The last comment from Andres Taylor on the documentation for 2.0 
> <http://docs.neo4j.org/chunked/2.0.0/query-merge.html> suggest that it 
> should all be complete by now.
>
> I am seeing an issue with this query where multiple concurrent calls 
> return the same value.
>
> MERGE (nid:UniqueId:_UniqueId{type:{0}})
> ON CREATE SET nid.count = 1
> ON MATCH SET nid.count = nid.count + 1
> RETURN nid.count
>
> There is a label index on the type property.
>
> I see the same behaviour whether using the Neo4JTemplate or an annotated 
> Repository method, currently I am getting a deadlock when I try using the 
> ExecutionEngine directly (looking at this now). I should note that the 
> deadlock appears to be in the ForsetiClient so the presence of the HA jars 
> on my classpath may be important.
>
> -- 
> 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+un...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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