On Wed, Dec 30, 2009 at 4:41 PM, Laurent Laborde <[email protected]> wrote: > When doing purely readonly operation, transaction are not explicitely > required (and there is nothing to rollback). > The sql transaction for a select is "automagic", when a potentially > long select is done, the query work on a "frozen" state of the > database. > If you want to do multiple select using the same "frozen state" of the > 1st select, then you need to wrap everything in a transaction. > Otherwise, it's not needed. > When i'm doing a transaction around a "traverser ... for ..." i assume > that, while crawling the nodespace with my traverser, a concurrent > thread can commit change to the database withtout causing consistency > problem for my traverser : i work on a "frozen state" of the graph. > Of course, removing the transaction could cause some consistency > problem, but in most case it's perfectly acceptable ... if known. >
We are discussing removing the requirement of a transaction for reads. If you want to get a snapshot (i.e. subsequent reads in the same transaction always return the same value) you have to acquire read locks on the nodes and relationships before reading them. -Johan _______________________________________________ Neo mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

