[Neo4j] Has been blocked when i get the node's property

Mattias Persson mattias at neotechnology.com
Sun Sep 25 19:04:53 CEST 2011


If you've got 100 concurrent threads writing to one node only one can write
to it at a time. Write locks are held from the time you do a write operation
on that node until that transaction which made that write operation
finishes. So in this scenario your setProperty calls will be serial instead
of parallell. Is this just a test or are you having a problem with this in a
real scenario?

2011/9/25 iamyuanlong <yuanlong1318 at gmail.com>

> hi McKinley,
> This is my test code:
>
> http://neo4j-community-discussions.438527.n3.nabble.com/file/n3366449/Entity.java
> Entity.java
>
> http://neo4j-community-discussions.438527.n3.nabble.com/file/n3366449/EntityTest2.java
> EntityTest2.java
>
>
>
> Do the testCreateNode to create a node with a property "fansnum".
> Then run testConcurrent. You will find  a lot logs about get node's
> property
> will cost more then 1ms.In fact more then 15ms. Why?
>
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Has-been-blocked-when-i-get-the-node-s-property-tp3365819p3366449.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> _______________________________________________
> Neo4j mailing list
> User at lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [mattias at neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com


More information about the User mailing list