Ah, right - the index-free traversal is the king! Thanks Peter!
-Josef. On úterý, 10. ledna 2012 at 20:40, Peter Neubauer wrote: > Josef, > Yes, N1 is locked during the creation of the relationship. Different than a > table, Neo4j actually stor direct links between the nodes as relationships, > making data-local traversals without index lookups possible. This means > both nodes will be locked during the TX1 . > > HTH > > /Peter > > On Tuesday, January 10, 2012, Josef Holy <josef.h...@gmail.com > (mailto:josef.h...@gmail.com)> wrote: > > Hello neo4j-ers, > > > > I have question - when 2 threads (in embedded neo4j mode) want to > concurrently create the following RELs A and B (each within their own > transaction, nodes N1, N2 and N3 existed before): > > > > Thread 1 - tx1 - N1--RELA-->N2 > > Thread 2 - tx2 - N1--RELB-->N3 > > > > does the node N1 represent critical section? I mean - if Thread 2's tx2 > starts later, does it have to wait till Thread 1's tx1 finishes and thus > releases node N1? > > > > Sorry for asking, but I don't know the neo4j internals and I would > expect, that the creation of relationship wouldn't lock the 2 nodes - > similarly to the relational (SQL) db, where adding rows to M:N > 'relationship' table also doesn't lock records in the entity table(s)... > > > > Please advise... > > > > > > Thanks a lot! > > > > -Josef. > > > > _______________________________________________ > > NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please > register and consider posting at > https://groups.google.com/forum/#!forum/neo4j > > > > Neo4j mailing list > > User@lists.neo4j.org (mailto:User@lists.neo4j.org) > > https://lists.neo4j.org/mailman/listinfo/user > > -- > > Cheers, > > /peter neubauer > > Google: neubauer.peter > Skype: peter.neubauer > Phone: +46 704 106975 > LinkedIn: http://www.linkedin.com/in/neubauer > Twitter: @peterneubauer > Tungle: tungle.me/peterneubauer (http://tungle.me/peterneubauer) > > brew install neo4j && neo4j start > heroku addons:add neo4j > _______________________________________________ > NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register > and consider posting at https://groups.google.com/forum/#!forum/neo4j > > Neo4j mailing list > User@lists.neo4j.org (mailto:User@lists.neo4j.org) > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register and consider posting at https://groups.google.com/forum/#!forum/neo4j Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user